lkml.org 
[lkml]   [2022]   [Apr]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2 3/4] hwmon: (asus-ec-sensors) add support for board families
> > +enum board_family {
> > + family_amd_500_series,
>
> The default enum value is 0. This means that specifying nothing
> for .family matches in the structure below always matches the first
> enum, which doesn't make much sense and might cause trouble in the
> future. I would suggest to explicitly select a value != 0 as first
> entry, such as
>
> enum board_family {
> family_amd_500_series = 1,
> ...
> };
>
> to avoid that problem.

Thank you, added family_unknown member ( = 0) instead, to simplify
adding new members (I want this enum to be alphabetically sorted).

Eugene

\
 
 \ /
  Last update: 2022-04-26 23:51    [W:0.063 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site