Re: [PATCH v2 5/8] mtd: maps: gpio-addr-flash: Replace array with an integer
From: Boris Brezillon
Date: Mon Oct 01 2018 - 08:32:33 EST
On Mon, 1 Oct 2018 14:10:03 +0200
Ricardo Ribalda Delgado <ricardo.ribalda@xxxxxxxxx> wrote:
> > > + return;
> > > +
> > > + for (i = 0; i < state->gpio_count; i++) {
> > > + if ((ofs & BIT(i)) == (state->gpio_values & BIT(i)))
> >
> > Parens around the xx & BIT(i) operations are unneeded.
>
> If I remove it:
>
>
> ricardo@neopili:~/curro/kernel-upstream$ make drivers/mtd/maps/gpio-addr-flash.o
> CALL scripts/checksyscalls.sh
> DESCEND objtool
> CC drivers/mtd/maps/gpio-addr-flash.o
> drivers/mtd/maps/gpio-addr-flash.c: In function âgf_set_gpiosâ:
> drivers/mtd/maps/gpio-addr-flash.c:70:20: warning: suggest parentheses
> around comparison in operand of â&â [-Wparentheses]
> if (ofs & BIT(i) == (state->gpio_values & BIT(i)))
Hm, okay. I remember having a similar discussion on one of my patch and
people suggesting to drop it because of the == precedence on x & a.
Anyway, let's just keep it like that.