From: David Miller <davem@davemloft.net>
To: julia.lawall@lip6.fr
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: Sat, 07 Nov 2015 13:18:34 -0500 (EST) [thread overview]
Message-ID: <20151107.131834.2152455608881468661.davem@davemloft.net> (raw)
In-Reply-To: <alpine.DEB.2.10.1511061142440.2378@hadrien>
From: Julia Lawall <julia.lawall@lip6.fr>
Date: Fri, 6 Nov 2015 11:57:34 +0100 (CET)
>> > Would it be preferable to remove the macro entirely and inline the for
>> > loop header?
>>
>> Could you show me an example of how this would look exactly?
>
> One possible solution is below. I moved the initialization of the nh
> pointer inside the loop to reduce the size of the loop header. One could
> also inline fi->fib_nh[nhsel] where it occurs, but it seemed that that
> would make quite long expressions.
Personally I like the explicit named iterator. It is descriptive and
tells that we are walking over all of the nexthops for a route.
next prev parent reply other threads:[~2015-11-07 18:18 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
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 [this message]
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=20151107.131834.2152455608881468661.davem@davemloft.net \
--to=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).