On Thu, 26 Jul 2007 09:46:48 +0100 Stephen Hemminger <[EMAIL PROTECTED]> 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

-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to