On Fri, Dec 16, 2022 at 04:57:02PM +0200, Andy Shevchenko wrote: > On Fri, Dec 16, 2022 at 12:30:13PM +0100, Hans de Goede wrote: > > + /* If bits 31-24 of the _DSM entry are all 0 then the signal is inverted */ > > > + active_value = obj->integer.value >> 24; > > + if (!active_value) > > Not sure why you need a temporary variable for this. Just use > GENMASK()/GENMASK_ULL()? > > if (obj->integer.value & GENMASK(31, 24)); Of course should be if (!(obj->integer.value & GENMASK(31, 24))) > In this case you even don't need to repeat bit numbers in the comment. > > > + polarity ^= GPIO_ACTIVE_LOW; -- With Best Regards, Andy Shevchenko