From: Akinobu Mita <akinobu.mita@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: "David S. Miller" <davem@davemloft.net>
Subject: [PATCH] sch_htb: use rb_first() cleanup
Date: Thu, 12 Oct 2006 14:30:24 +0900 [thread overview]
Message-ID: <20061012053024.GC29465@localhost> (raw)
Use rb_first() to get first entry in rb tree.
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Akinbou Mita <akinobu.mita@gmail.com>
net/sched/sch_htb.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
Index: work-fault-inject/net/sched/sch_htb.c
===================================================================
--- work-fault-inject.orig/net/sched/sch_htb.c
+++ work-fault-inject/net/sched/sch_htb.c
@@ -786,11 +786,10 @@ static long htb_do_events(struct htb_sch
for (i = 0; i < 500; i++) {
struct htb_class *cl;
long diff;
- struct rb_node *p = q->wait_pq[level].rb_node;
+ struct rb_node *p = rb_first(&q->wait_pq[level]);
+
if (!p)
return 0;
- while (p->rb_left)
- p = p->rb_left;
cl = rb_entry(p, struct htb_class, pq_node);
if (time_after(cl->pq_key, q->jiffies)) {
next reply other threads:[~2006-10-12 5:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-12 5:30 Akinobu Mita [this message]
2006-10-12 8:52 ` [PATCH] sch_htb: use rb_first() cleanup David Miller
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=20061012053024.GC29465@localhost \
--to=akinobu.mita@gmail.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.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 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.