Re: [PATCH v4] Add OneXPlayer mini AMD sensors driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Nov 02, 2022 at 05:11:00PM -0300, Joaquin Aramendia wrote:
[ ... ]
> > > +
> > > +     switch (type) {
> > > +     case hwmon_fan:
> > > +             switch (attr) {
> > > +             case hwmon_fan_input:
> > > +                     return read_from_ec(OXP_SENSOR_FAN_REG, 2, val);
> > > +             default:
> >
> > Missing break;
> 
> Oops. Is not really needed but I'll add them.
> 
Technically you are correct, but we would have static analyzers scream at
us, and it is against kernel coding style. There is a practical reason
for that: Missing break statements are often the result of coding errors.

Guenter



[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux