czw., 2 kwi 2020 o 22:19 Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> napisał(a): > > Use BIT() and GENMASK() where it's appropriate. > At the same time drop it where it's not appropriate. > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> > --- > drivers/gpio/gpio-pch.c | 43 +++++++++++++++++++++-------------------- > 1 file changed, 22 insertions(+), 21 deletions(-) > > diff --git a/drivers/gpio/gpio-pch.c b/drivers/gpio/gpio-pch.c > index 3f3d9a94b709..0b5aea0b1e8a 100644 > --- a/drivers/gpio/gpio-pch.c > +++ b/drivers/gpio/gpio-pch.c > @@ -2,6 +2,7 @@ > /* > * Copyright (C) 2011 LAPIS Semiconductor Co., Ltd. > */ > +#include <linux/bits.h> > #include <linux/gpio/driver.h> > #include <linux/interrupt.h> > #include <linux/irq.h> > @@ -11,11 +12,11 @@ > #include <linux/slab.h> > > #define PCH_EDGE_FALLING 0 > -#define PCH_EDGE_RISING BIT(0) > -#define PCH_LEVEL_L BIT(1) > -#define PCH_LEVEL_H (BIT(0) | BIT(1)) > +#define PCH_EDGE_RISING 1 > +#define PCH_LEVEL_L 2 > +#define PCH_LEVEL_H 3 If these define bitmask values for some fields in registers, then I'd suggest to write it as hex numbers. I find it much more readable this way. Bart