-----Original Message-----
From: Andy Shevchenko <redacted>
Sent: Friday, July 8, 2022 4:50 PM
To: Sa, Nuno <Nuno.Sa@analog.com>
Cc: devicetree <redacted>; open list:GPIO
SUBSYSTEM [off-list ref]; linux-input <linux-
input@vger.kernel.org>; Dmitry Torokhov
[off-list ref]; Bartosz Golaszewski
[off-list ref]; Hennerich, Michael
[off-list ref]; Rob Herring
[off-list ref]; Krzysztof Kozlowski
[off-list ref]; Linus Walleij
[off-list ref]
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á [off-list ref] wrote:
quoted
Just some code cleanup regarding coding style. No functional
changes
quoted
intended.
...
quoted
-#define ADP5588_KE_IEN (1 << 0)
quoted
+#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..
...
quoted
#define ADP5588_KEC 0xF
Probably then GENMASK() ?
Makes sense yes...
...
quoted
#define KEY_EV_MASK (0x7F)
GENMASK()
...
quoted
-#define KP_SEL(x) (0xFFFF >> (16 - x)) /* 2^x-1 */
+#define KP_SEL(x) (0xFFFF >> (16 - (x))) /* 2^x-1 */
Ditto.
- Nuno Sá