public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
To: Stephen Hemminger <shemminger@linux-foundation.org>
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 14:20:06 -0500	[thread overview]
Message-ID: <20091208192006.GC1653@Krystal> (raw)
In-Reply-To: <20091208110642.1dbb53cd@nehalam>

* 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 */
}


> 
> -- 

-- 
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68

  reply	other threads:[~2009-12-08 19:25 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 [this message]
2009-12-08 19:29     ` Stephen Hemminger
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=20091208192006.GC1653@Krystal \
    --to=mathieu.desnoyers@polymtl.ca \
    --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=paulmck@us.ibm.com \
    --cc=robert.olsson@its.uu.se \
    --cc=shemminger@linux-foundation.org \
    /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