All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jarek Poplawski <jarkao2@o2.pl>
To: Simon Lodal <simonl@parknet.dk>
Cc: Andi Kleen <ak@suse.de>, Patrick McHardy <kaber@trash.net>,
	netdev@vger.kernel.org, lartc@mailman.ds9a.nl,
	Ingo Oeser <netdev@axxeo.de>
Subject: [LARTC] Re: [PATCH] HTB O(1) class lookup
Date: Thu, 08 Feb 2007 07:36:49 +0000	[thread overview]
Message-ID: <20070208073649.GA1751@ff.dom.local> (raw)
In-Reply-To: <200702051814.13899.simonl@parknet.dk>

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. 
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

WARNING: multiple messages have this Message-ID (diff)
From: Jarek Poplawski <jarkao2@o2.pl>
To: Simon Lodal <simonl@parknet.dk>
Cc: Andi Kleen <ak@suse.de>, Patrick McHardy <kaber@trash.net>,
	netdev@vger.kernel.org, lartc@mailman.ds9a.nl,
	Ingo Oeser <netdev@axxeo.de>
Subject: Re: [PATCH] HTB O(1) class lookup
Date: Thu, 8 Feb 2007 08:36:49 +0100	[thread overview]
Message-ID: <20070208073649.GA1751@ff.dom.local> (raw)
In-Reply-To: <200702051814.13899.simonl@parknet.dk>

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. 

  parent reply	other threads:[~2007-02-08  7:36 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-01  5:18 [LARTC] [PATCH] HTB O(1) class lookup Simon Lodal
2007-02-01  5:18 ` Simon Lodal
2007-02-01  6:08 ` [LARTC] " Patrick McHardy
2007-02-01  6:08   ` Patrick McHardy
2007-02-01  7:08   ` [LARTC] " Simon Lodal
2007-02-01  7:08     ` Simon Lodal
2007-02-01 11:30     ` Andi Kleen
2007-02-05 10:16       ` [LARTC] " Jarek Poplawski
2007-02-05 10:16         ` Jarek Poplawski
2007-02-05 11:24         ` Andi Kleen
2007-02-05 12:45           ` Ingo Oeser
2007-02-05 17:14         ` [LARTC] " Simon Lodal
2007-02-05 17:14           ` Simon Lodal
2007-02-06  8:08           ` [LARTC] " Jarek Poplawski
2007-02-06  8:08             ` Jarek Poplawski
2007-02-08  7:36           ` Jarek Poplawski [this message]
2007-02-08  7:36             ` Jarek Poplawski
2007-02-05 18:21       ` [LARTC] " Simon Lodal
2007-02-05 18:21         ` Simon Lodal
2007-02-01 13:06   ` jamal
2007-02-01 22:44 ` [LARTC] " Konrad Cempura

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=20070208073649.GA1751@ff.dom.local \
    --to=jarkao2@o2.pl \
    --cc=ak@suse.de \
    --cc=kaber@trash.net \
    --cc=lartc@mailman.ds9a.nl \
    --cc=netdev@axxeo.de \
    --cc=netdev@vger.kernel.org \
    --cc=simonl@parknet.dk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.