Re: [PATCH 07/10] input: keyboard: adp5588-keys: fix coding style warnings

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

 



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.

...

>  #define ADP5588_KEC            0xF

Probably then GENMASK() ?

...

>  #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.

-- 
With Best Regards,
Andy Shevchenko




[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux