[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160608115248.GA2603@salvia>
Date: Wed, 8 Jun 2016 13:52:48 +0200
From: Pablo Neira Ayuso <pablo@...filter.org>
To: Joe Perches <joe@...ches.com>
Cc: tcharding <me@...in.cc>,
Stephen Hemminger <stephen@...workplumber.org>,
"David S. Miller" <davem@...emloft.net>,
netfilter-devel@...r.kernel.org, coreteam@...filter.org,
netdev@...r.kernel.org
Subject: Re: [PATCH 1/3] bridge: netfilter: checkpatch whitespace fixes
On Tue, Jun 07, 2016 at 11:02:30AM -0700, Joe Perches wrote:
> On Tue, 2016-06-07 at 19:34 +0200, Pablo Neira Ayuso wrote:
> > On Tue, Jun 07, 2016 at 10:04:40AM -0700, Joe Perches wrote:
> > > One more question, is this chunk below correct from
> > > coding style point of view?
> >
> > if (info->bitmask & EBT_STP_ROOTADDR) {
> > verdict = 0;
> > for (i = 0; i < 6; i++)
> > - verdict |= (stpc->root[2+i] ^ c->root_addr[i]) &
> > - c->root_addrmsk[i];
> > + verdict |= (stpc->root[2 + i] ^ c->root_addr[i]) &
> > + c->root_addrmsk[i];
> >
> > I think the previous line is fine.
>
> "2+i" or "2 + i", either is OK.
> Multiple line statement alignment doesn't
> matter much.
Sorry, I was actually refering to:
> > + verdict |= (stpc->root[2 + i] ^ c->root_addr[i]) &
> > + c->root_addrmsk[i];
^^^
instead of:
> > - verdict |= (stpc->root[2+i] ^ c->root_addr[i]) &
> > - c->root_addrmsk[i];
^
here.
> I think either is fine and both are "don't care, don't need"
> to change from one to another to satisfy some silly whitespace
> overlord brainless script.
>
> Perhaps it's better to add a function for this though.
I like this function idea :).
Powered by blists - more mailing lists