lkml.org 
[lkml]   [2018]   [Oct]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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@gmail.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@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.

\
 
 \ /
  Last update: 2018-10-01 14:33    [W:1.296 / U:0.368 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site