lkml.org 
[lkml]   [2021]   [Oct]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v6 1/2] hwmon: (asus_wmi_ec_sensors) Support B550 Asus WMI.
From
Date
On 10/14/21 7:36 AM, Eugene Shalygin wrote:
>> The compiler aligns the data nicely anyway (it will just leave
>> a 1-byte hole where needed), so the packing is really irrelevant.
>> Apart of that, does the above suggest that some information/
>> code is now missing from the driver ?
>
> It is perhaps an unnecessary removal which will need to be undone
> anyway when I (or others) add the south bridge voltage sensor.
> Everything is OK with that change now, but since the size of the
> address struct or union is 32 bits anyway, I would not remove that
> field.
>

If the field is not needed now, it is better to not have it in
the first place. "We'll need it later" is all but a guarantee
for dead code, unless the patch using it is added as part of
the same series.

In other words: If there is other dead code in the patch, please
remove it now. I don't want to find it when I have a closer look
at it. If there is code which is supposed to be used later on,
either introduce it when it is needed, or introduce it with the
same patch series that uses it.

Guenter

\
 
 \ /
  Last update: 2021-10-14 18:46    [W:0.111 / U:0.332 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site