netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Stephen Hemminger <shemminger@linux-foundation.org>
Cc: Adrian Bunk <bunk@stusta.de>,
	Robert Olsson <Robert.Olsson@data.slu.se>,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	Ingo Molnar <mingo@elte.hu>, Josh Triplett <josh@kernel.org>,
	netdev@vger.kernel.org
Subject: Re: [RFT] fib_trie: cleanup
Date: Thu, 26 Jul 2007 02:04:31 -0700	[thread overview]
Message-ID: <20070726020431.1e693866.akpm@linux-foundation.org> (raw)
In-Reply-To: <20070726094648.3b7301ae@oldman>

On Thu, 26 Jul 2007 09:46:48 +0100 Stephen Hemminger <shemminger@linux-foundation.org> wrote:

> Try this out:
>      * replace macro's with inlines
>      * get rid of places doing multiple evaluations of NODE_PARENT

And it fixes the rcu abuse which resulted in
http://lkml.org/lkml/2007/7/25/319.  Which I assume is what inspired the
effort.


your typecasting style is inconsistent:

> +	return rcu_dereference((struct tnode *) (node->parent & ~NODE_TYPE_MASK));

space

> +			   (unsigned long)ptr | NODE_TYPE(node));

no space

> +	while (tn != NULL && (tp = node_parent((struct node *)tn)) != NULL) {

no space

> +		tp = node_parent((struct node *) tn);

space

> +		node_set_parent((struct node *)l, tp);

no space

> +		node_set_parent((struct node *)tn, tp);

no space

> +			struct tnode *parent = node_parent((struct node *) pn);

space

etc.


"no space" seems to be more usual, by about a 50.1:49.9 ratio.  It is
a lot more common in net/:

box:/usr/src/25> grep '[(]unsigned long[)] ' net/*/*.c  | wc -l
91
box:/usr/src/25> grep '[(]unsigned long[)][^ ]' net/*/*.c  | wc -l 
242


  parent reply	other threads:[~2007-07-26  9:05 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20070725040304.111550f4.akpm@linux-foundation.org>
2007-07-25 13:36 ` [-mm patch] one e1000 driver should be enough for everyone Adrian Bunk
2007-07-25 13:48   ` Jeff Garzik
2007-07-25 14:46     ` Adrian Bunk
2007-07-25 15:05       ` Jeff Garzik
2007-07-25 15:21         ` Kok, Auke
2007-07-25 15:23           ` Jeff Garzik
2007-07-25 20:50           ` Andrew Morton
2007-07-25 18:15 ` 2.6.23-rc1-mm1: net/ipv4/fib_trie.c compile error Adrian Bunk
2007-07-26  8:46   ` [RFT] fib_trie: cleanup Stephen Hemminger
2007-07-26  8:49     ` David Miller
2007-07-26 10:32       ` Robert Olsson
2007-07-26  9:04     ` Andrew Morton [this message]
2007-07-26  9:15       ` Stephen Hemminger
2007-07-26 10:49       ` [RFC] fib_trie: whitespace cleanup Stephen Hemminger
2007-07-26 15:44         ` Paul E. McKenney
2007-07-27  4:56           ` Andrew Morton
2007-07-30 17:07             ` Paul E. McKenney
2007-07-26 10:43     ` [RFT] fib_trie: macro cleanup Stephen Hemminger
2007-07-26 10:54       ` Andrew Morton
2007-07-28 15:44 ` NETPOLL=y , NETDEVICES=n compile error ( Re: 2.6.23-rc1-mm1 ) Gabriel C
2007-07-28 17:26   ` Andrew Morton
2007-07-28 18:42     ` Gabriel C
2007-07-31  8:32       ` Jarek Poplawski
2007-07-31 10:14         ` Gabriel C
2007-07-31 11:44           ` Jason Wessel
2007-07-31 12:47             ` Jarek Poplawski
2007-07-31 12:17           ` Jarek Poplawski
2007-07-31 15:05             ` Gabriel C
2007-08-01  9:59               ` Jarek Poplawski
2007-08-02  2:02                 ` Matt Mackall
2007-08-02  9:00                   ` Jarek Poplawski
2007-08-02 15:59                     ` Matt Mackall
2007-08-03  7:30                       ` Jarek Poplawski
2007-08-02  9:36                   ` Sam Ravnborg
2007-08-02 10:32                     ` Satyam Sharma
2007-08-02 11:40                       ` Satyam Sharma
2007-08-02 11:40                       ` Jarek Poplawski
2007-08-02 11:56                         ` Satyam Sharma
2007-08-02 12:52                           ` Jarek Poplawski
2007-08-06 11:51                     ` [PATCH] docs: note about select in kconfig-language.txt Jarek Poplawski

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=20070726020431.1e693866.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=Robert.Olsson@data.slu.se \
    --cc=bunk@stusta.de \
    --cc=josh@kernel.org \
    --cc=mingo@elte.hu \
    --cc=netdev@vger.kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --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;
as well as URLs for NNTP newsgroup(s).