From: Stephen Hemminger <shemminger@linux-foundation.org>
To: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: "David S. Miller" <davem@davemloft.net>,
Robert Olsson <robert.olsson@its.uu.se>,
Jens Laas <jens.laas@data.slu.se>,
Hans Liss <hans.liss@its.uu.se>,
"Paul E. McKenney" <paulmck@us.ibm.com>,
Patrick McHardy <kaber@trash.net>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fib-trie: code cleanup
Date: Tue, 8 Dec 2009 11:29:10 -0800 [thread overview]
Message-ID: <20091208112910.7a1a3d43@nehalam> (raw)
In-Reply-To: <20091208192006.GC1653@Krystal>
On Tue, 8 Dec 2009 14:20:06 -0500
Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> wrote:
> * Stephen Hemminger (shemminger@linux-foundation.org) wrote:
> > On Tue, 8 Dec 2009 13:48:39 -0500
> > Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> wrote:
> >
> > > - while ( (tb_node = rcu_dereference(tb->tb_hlist.next)) ) {
> > > + while ((tb_node = rcu_dereference(tb->tb_hlist.next))) {
> > >
> >
> > This is clearer before with the added whitespace, ignore checkpatch natterings.
>
> OK
>
> Then we should do the same for all assignment within while() :
>
> static void tnode_free_flush(void)
> {
> struct tnode *tn;
>
> while ( (tn = tnode_free_head) ) {
>
> ...
>
> static struct leaf *leaf_walk_rcu(struct tnode *p, struct node *c)
> {
> .....
> /* Node empty, walk back up to parent */
> c = (struct node *) p;
> } while ( (p = node_parent_rcu(c)) != NULL);
>
> return NULL; /* Root of trie */
> }
>
>
> >
> > --
>
Yes, consistency on this makes sense.
--
next prev parent reply other threads:[~2009-12-08 19:29 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-08 18:48 [PATCH] fib-trie: code cleanup Mathieu Desnoyers
2009-12-08 19:05 ` Stephen Hemminger
2009-12-08 19:17 ` Mathieu Desnoyers
2009-12-08 19:06 ` Stephen Hemminger
2009-12-08 19:20 ` Mathieu Desnoyers
2009-12-08 19:29 ` Stephen Hemminger [this message]
2009-12-08 19:09 ` Stephen Hemminger
2009-12-08 19:25 ` [PATCH] fib-trie: code cleanup (v2) Mathieu Desnoyers
2009-12-08 19:28 ` Stephen Hemminger
2009-12-08 19:32 ` Mathieu Desnoyers
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=20091208112910.7a1a3d43@nehalam \
--to=shemminger@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=hans.liss@its.uu.se \
--cc=jens.laas@data.slu.se \
--cc=kaber@trash.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@polymtl.ca \
--cc=paulmck@us.ibm.com \
--cc=robert.olsson@its.uu.se \
/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