Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965853AbZLHTZL (ORCPT ); Tue, 8 Dec 2009 14:25:11 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S965837AbZLHTZE (ORCPT ); Tue, 8 Dec 2009 14:25:04 -0500 Received: from tomts5.bellnexxia.net ([209.226.175.25]:56606 "EHLO tomts5-srv.bellnexxia.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965833AbZLHTZD (ORCPT ); Tue, 8 Dec 2009 14:25:03 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ao4FAGcyHkuuWOw8/2dsb2JhbACBTNgahDIE Date: Tue, 8 Dec 2009 14:20:06 -0500 From: Mathieu Desnoyers To: Stephen Hemminger Cc: "David S. Miller" , Robert Olsson , Jens Laas , Hans Liss , "Paul E. McKenney" , Patrick McHardy , linux-kernel@vger.kernel.org Subject: Re: [PATCH] fib-trie: code cleanup Message-ID: <20091208192006.GC1653@Krystal> References: <20091208184839.GA31383@Krystal> <20091208110642.1dbb53cd@nehalam> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline In-Reply-To: <20091208110642.1dbb53cd@nehalam> X-Editor: vi X-Info: http://krystal.dyndns.org:8080 X-Operating-System: Linux/2.6.27.31-grsec (i686) X-Uptime: 14:17:58 up 6 days, 10:08, 4 users, load average: 0.35, 0.18, 0.11 User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1180 Lines: 44 * Stephen Hemminger (shemminger@linux-foundation.org) wrote: > On Tue, 8 Dec 2009 13:48:39 -0500 > Mathieu Desnoyers 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/