Thread (36 messages) 36 messages, 7 authors, 2022-07-12

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

From: Andy Shevchenko <hidden>
Date: 2022-07-08 14:50:38
Also in: linux-devicetree, linux-gpio

On Fri, Jul 8, 2022 at 11:36 AM Nuno Sá [off-list ref] 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help