[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20181001143219.59423ad3@bbrezillon>
Date: Mon, 1 Oct 2018 14:32:19 +0200
From: Boris Brezillon <boris.brezillon@...tlin.com>
To: Ricardo Ribalda Delgado <ricardo.ribalda@...il.com>
Cc: David Woodhouse <dwmw2@...radead.org>,
Brian Norris <computersforpeace@...il.com>,
Marek Vasut <marek.vasut@...il.com>,
Richard Weinberger <richard@....at>,
linux-mtd@...ts.infradead.org, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 5/8] mtd: maps: gpio-addr-flash: Replace array with
an integer
On Mon, 1 Oct 2018 14:10:03 +0200
Ricardo Ribalda Delgado <ricardo.ribalda@...il.com> 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@...pili:~/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.
Powered by blists - more mailing lists