projects
/
GitHub
/
MotorolaMobilityLLC
/
kernel-slsi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b974179
)
[PKT_SCHED] sch_htb: use rb_first() cleanup
author
Akinbou Mita
<akinobu.mita@gmail.com>
Thu, 12 Oct 2006 08:52:05 +0000
(
01:52
-0700)
committer
David S. Miller
<davem@davemloft.net>
Thu, 12 Oct 2006 08:52:05 +0000
(
01:52
-0700)
Use rb_first() to get first entry in rb tree.
Signed-off-by: Akinbou Mita <akinobu.mita@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/sch_htb.c
patch
|
blob
|
blame
|
history
diff --git
a/net/sched/sch_htb.c
b/net/sched/sch_htb.c
index bb3ddd4784b1cebfd4668dc15df844b484b36267..9b9c555c713f0a4666c00657da1b37037928b722 100644
(file)
--- a/
net/sched/sch_htb.c
+++ b/
net/sched/sch_htb.c
@@
-786,11
+786,10
@@
static long htb_do_events(struct htb_sched *q, int level)
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)) {