[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20070208073649.GA1751@ff.dom.local>
Date: Thu, 8 Feb 2007 08:36:49 +0100
From: Jarek Poplawski <jarkao2@...pl>
To: Simon Lodal <simonl@...knet.dk>
Cc: Andi Kleen <ak@...e.de>, Patrick McHardy <kaber@...sh.net>,
netdev@...r.kernel.org, lartc@...lman.ds9a.nl,
Ingo Oeser <netdev@...eo.de>
Subject: Re: [PATCH] HTB O(1) class lookup
On Mon, Feb 05, 2007 at 06:14:13PM +0100, Simon Lodal wrote:
...
> Regards
...
It seems decisions makers need more time, so I'd add
2 cents more:
1c: an indentation could be improved (spaces around
operators), like in these places:
>+#define HTB_MAX_CLS (TC_H_MIN(-1)+1)
...
>+ htb_cls_array* a;
...
>+ int cnt,done;
etc.
2c: it is a question of taste, but here:
> err = -ENOBUFS;
>+ if (q->classes[HTB_CLS_ARRAY(minorid)] == NULL) {
>+ if ((q->classes[HTB_CLS_ARRAY(minorid)] =
>+ kzalloc(sizeof(htb_cls_array), GFP_KERNEL))
>+ == NULL)
>+ goto failure;
>+ }
> if ((cl = kzalloc(sizeof(*cl), GFP_KERNEL)) == NULL)
> goto failure;
it would be probably more readable and a bit merciful
to the stressed system to free this htb_cls_array after
the last error (I know it's not a leak).
Regards,
Jarek P.
PS: 1c extra - it's easier to read a diff if you use -p option.
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists