lkml.org 
[lkml]   [2009]   [Dec]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] fib-trie: code cleanup
* 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


\
 
 \ /
  Last update: 2009-12-08 20:27    [W:0.064 / U:0.656 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site