Hi, On 13.04.21 12:07, Sascha Hauer wrote: > imx1_gpio_val() and imx31_gpio_val() lack various braces. Instead of > adding all these convert them to static inline functions. > > Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx> > --- > arch/arm/mach-imx/include/mach/imx-gpio.h | 13 ++++++++++--- > 1 file changed, 10 insertions(+), 3 deletions(-) > > diff --git a/arch/arm/mach-imx/include/mach/imx-gpio.h b/arch/arm/mach-imx/include/mach/imx-gpio.h > index 0cfd16f4fa..c7b8ccffcb 100644 > --- a/arch/arm/mach-imx/include/mach/imx-gpio.h > +++ b/arch/arm/mach-imx/include/mach/imx-gpio.h > @@ -72,11 +72,18 @@ static inline void imx31_gpio_direction_input(void *base, int gpio) > #define imx6_gpio_direction_input(base, gpio) imx31_gpio_direction_input(base, gpio) > #define imx8m_gpio_direction_input(base, gpio) imx31_gpio_direction_input(base, gpio) > > -#define imx1_gpio_val(base, gpio) readl(base + 0x1c) & (1 << gpio) ? 1 : 0 > +static inline int imx1_gpio_val(void *base, int gpio) void __iomem * > +{ > + return readl(base + 0x1c) & (1 << gpio) ? 1 : 0; > +} > + > +static inline int imx31_gpio_val(void *base, int gpio) Same > +{ > + return readl(base) & (1 << gpio) ? 1 : 0; > +} > + With this addressed, Reviewed-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx> > #define imx21_gpio_val(base, gpio) imx1_gpio_val(base, gpio) > #define imx27_gpio_val(base, gpio) imx1_gpio_val(base, gpio) > - > -#define imx31_gpio_val(base, gpio) readl(base) & (1 << gpio) ? 1 : 0 > #define imx25_gpio_val(base, gpio) imx31_gpio_val(base, gpio) > #define imx35_gpio_val(base, gpio) imx31_gpio_val(base, gpio) > #define imx51_gpio_val(base, gpio) imx31_gpio_val(base, gpio) > -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox