]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - net/sched/sch_cbq.c
hlist: drop the node parameter from iterators
[karo-tx-linux.git] / net / sched / sch_cbq.c
index 0e19948470b88ce8dff6c3e1cded52a6121fe7ea..13aa47aa2ffb48ea25990dce3762b83e775d7bcf 100644 (file)
@@ -1041,14 +1041,13 @@ static void cbq_adjust_levels(struct cbq_class *this)
 static void cbq_normalize_quanta(struct cbq_sched_data *q, int prio)
 {
        struct cbq_class *cl;
-       struct hlist_node *n;
        unsigned int h;
 
        if (q->quanta[prio] == 0)
                return;
 
        for (h = 0; h < q->clhash.hashsize; h++) {
-               hlist_for_each_entry(cl, n, &q->clhash.hash[h], common.hnode) {
+               hlist_for_each_entry(cl, &q->clhash.hash[h], common.hnode) {
                        /* BUGGGG... Beware! This expression suffer of
                         * arithmetic overflows!
                         */
@@ -1087,10 +1086,9 @@ static void cbq_sync_defmap(struct cbq_class *cl)
                        continue;
 
                for (h = 0; h < q->clhash.hashsize; h++) {
-                       struct hlist_node *n;
                        struct cbq_class *c;
 
-                       hlist_for_each_entry(c, n, &q->clhash.hash[h],
+                       hlist_for_each_entry(c, &q->clhash.hash[h],
                                             common.hnode) {
                                if (c->split == split && c->level < level &&
                                    c->defmap & (1<<i)) {
@@ -1210,7 +1208,6 @@ cbq_reset(struct Qdisc *sch)
 {
        struct cbq_sched_data *q = qdisc_priv(sch);
        struct cbq_class *cl;
-       struct hlist_node *n;
        int prio;
        unsigned int h;
 
@@ -1228,7 +1225,7 @@ cbq_reset(struct Qdisc *sch)
                q->active[prio] = NULL;
 
        for (h = 0; h < q->clhash.hashsize; h++) {
-               hlist_for_each_entry(cl, n, &q->clhash.hash[h], common.hnode) {
+               hlist_for_each_entry(cl, &q->clhash.hash[h], common.hnode) {
                        qdisc_reset(cl->q);
 
                        cl->next_alive = NULL;
@@ -1697,7 +1694,7 @@ static void cbq_destroy_class(struct Qdisc *sch, struct cbq_class *cl)
 static void cbq_destroy(struct Qdisc *sch)
 {
        struct cbq_sched_data *q = qdisc_priv(sch);
-       struct hlist_node *n, *next;
+       struct hlist_node *next;
        struct cbq_class *cl;
        unsigned int h;
 
@@ -1710,11 +1707,11 @@ static void cbq_destroy(struct Qdisc *sch)
         * be bound to classes which have been destroyed already. --TGR '04
         */
        for (h = 0; h < q->clhash.hashsize; h++) {
-               hlist_for_each_entry(cl, n, &q->clhash.hash[h], common.hnode)
+               hlist_for_each_entry(cl, &q->clhash.hash[h], common.hnode)
                        tcf_destroy_chain(&cl->filter_list);
        }
        for (h = 0; h < q->clhash.hashsize; h++) {
-               hlist_for_each_entry_safe(cl, n, next, &q->clhash.hash[h],
+               hlist_for_each_entry_safe(cl, next, &q->clhash.hash[h],
                                          common.hnode)
                        cbq_destroy_class(sch, cl);
        }
@@ -2013,14 +2010,13 @@ static void cbq_walk(struct Qdisc *sch, struct qdisc_walker *arg)
 {
        struct cbq_sched_data *q = qdisc_priv(sch);
        struct cbq_class *cl;
-       struct hlist_node *n;
        unsigned int h;
 
        if (arg->stop)
                return;
 
        for (h = 0; h < q->clhash.hashsize; h++) {
-               hlist_for_each_entry(cl, n, &q->clhash.hash[h], common.hnode) {
+               hlist_for_each_entry(cl, &q->clhash.hash[h], common.hnode) {
                        if (arg->count < arg->skip) {
                                arg->count++;
                                continue;