> -----Original Message----- > From: Andy Shevchenko <andy.shevchenko@xxxxxxxxx> > Sent: Friday, July 8, 2022 4:50 PM > To: Sa, Nuno <Nuno.Sa@xxxxxxxxxx> > Cc: devicetree <devicetree@xxxxxxxxxxxxxxx>; open list:GPIO > SUBSYSTEM <linux-gpio@xxxxxxxxxxxxxxx>; linux-input <linux- > input@xxxxxxxxxxxxxxx>; Dmitry Torokhov > <dmitry.torokhov@xxxxxxxxx>; Bartosz Golaszewski > <brgl@xxxxxxxx>; Hennerich, Michael > <Michael.Hennerich@xxxxxxxxxx>; Rob Herring > <robh+dt@xxxxxxxxxx>; Krzysztof Kozlowski > <krzysztof.kozlowski+dt@xxxxxxxxxx>; Linus Walleij > <linus.walleij@xxxxxxxxxx> > Subject: Re: [PATCH 07/10] input: keyboard: adp5588-keys: fix coding > style warnings > > [External] > > On Fri, Jul 8, 2022 at 11:36 AM Nuno Sá <nuno.sa@xxxxxxxxxx> wrote: > > > > Just some code cleanup regarding coding style. No functional > changes > > intended. > > ... > > > -#define ADP5588_KE_IEN (1 << 0) > > > +#define ADP5588_KE_IEN BIT(0) > > This is actually a change. And if there wasn't bits.h included, you > would do it as well. > You mean because of it being unsigned now? Well, I guess it's true but in practice I don't think it will have any side effect.. > ... > > > #define ADP5588_KEC 0xF > > Probably then GENMASK() ? Makes sense yes... > ... > > > #define KEY_EV_MASK (0x7F) > > GENMASK() > > ... > > > -#define KP_SEL(x) (0xFFFF >> (16 - x)) /* 2^x-1 */ > > +#define KP_SEL(x) (0xFFFF >> (16 - (x))) /* 2^x-1 */ > > Ditto. > - Nuno Sá