From: Joe Perches <joe@perches.com>
To: Julia Lawall <julia.lawall@lip6.fr>, David Miller <davem@davemloft.net>
Cc: kernel-janitors@vger.kernel.org,
linux-decnet-user@lists.sourceforge.net, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, lkp@intel.com,
roopa@cumulusnetworks.com, rshearma@brocade.com,
ebiederm@xmission.com
Subject: Re: [PATCH] decnet: remove macro-local declarations
Date: Thu, 05 Nov 2015 14:02:53 -0800 [thread overview]
Message-ID: <1446760973.21133.92.camel@perches.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1511052038400.2065@localhost6.localdomain6>
On Thu, 2015-11-05 at 20:38 +0100, Julia Lawall wrote:
> On Thu, 5 Nov 2015, David Miller wrote:
> > From: Julia Lawall <Julia.Lawall@lip6.fr>
> > Date: Thu, 5 Nov 2015 11:18:16 +0100>
> > > Move the variable declarations from the for_nexthops macro to the
> > > surrounding context, so that it is clear where these variables are
> > > declared. This also makes it possible to remove the endfor_nexthops macro.
> > >
> > > This change adds new arguments to the macro for_nexthops. They are ordered
> > > such that a pointer to the referenced object comes first, the index in the
> > > list comes next, and the list itself comes last, roughly in analogy with
> > > the list_for_each macros.
[]
> > > This patch takes care of a single file, where the macros are defined
> > > locally. If the basic transformation looks OK, I will change the other
> > > files that either likewise define their own macros or use the macros in
> > > net/mpls/internal.h. The potentially affected files are:
> > ...
> >
> > This looks fine to me.
> >
> > Please resubmit this when net-next opens back up, which should be
> > shortly after -rc1.
>
> OK, I'll do the others then too.
If you do can you please parenthesize the macro arguments?
#define for_nexthops(nh, nhsel, fi) \
for (nhsel = 0, nh = (fi)->fib_nh; nhsel < (fi)->fib_nhs; (nh)++, (nhsel)++)
instead of
for(nhsel = 0, nh = (fi)->fib_nh; nhsel < (fi)->fib_nhs; nh++, nhsel++)
And perhaps a renaming might be better
s/for_nexthops/for_each_nexthop/
next prev parent reply other threads:[~2015-11-05 22:02 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-05 10:18 [PATCH] decnet: remove macro-local declarations Julia Lawall
2015-11-05 19:26 ` David Miller
2015-11-05 19:38 ` Julia Lawall
2015-11-05 22:02 ` Joe Perches [this message]
2015-11-05 22:21 ` Julia Lawall
2015-11-05 20:08 ` Julia Lawall
2015-11-05 20:13 ` David Miller
2015-11-06 10:57 ` Julia Lawall
2015-11-06 11:44 ` walter harms
2015-11-06 11:49 ` Julia Lawall
2015-11-07 18:18 ` David Miller
2015-11-07 18:21 ` Julia Lawall
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1446760973.21133.92.camel@perches.com \
--to=joe@perches.com \
--cc=davem@davemloft.net \
--cc=ebiederm@xmission.com \
--cc=julia.lawall@lip6.fr \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-decnet-user@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=netdev@vger.kernel.org \
--cc=roopa@cumulusnetworks.com \
--cc=rshearma@brocade.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).