aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChangli Gao <xiaosuo@gmail.com>2010-10-16 09:04:08 -0400
committerDavid S. Miller <davem@davemloft.net>2010-10-21 06:09:47 -0400
commit3511c9132f8b1e1b5634e41a3331c44b0c13be70 (patch)
treefecff28f3bf8fbfdecd33d9b98253d60f1d45bf7
parent26d8ee75e08cfca8b65ade871d68c8cd96e4ea23 (diff)
net_sched: remove the unused parameter of qdisc_create_dflt()
The first parameter dev isn't in use in qdisc_create_dflt(). Signed-off-by: Changli Gao <xiaosuo@gmail.com> Acked-by: Jamal Hadi Salim <hadi@cyberus.ca> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--include/net/sch_generic.h3
-rw-r--r--net/sched/sch_atm.c5
-rw-r--r--net/sched/sch_cbq.c12
-rw-r--r--net/sched/sch_drr.c4
-rw-r--r--net/sched/sch_dsmark.c6
-rw-r--r--net/sched/sch_fifo.c3
-rw-r--r--net/sched/sch_generic.c10
-rw-r--r--net/sched/sch_hfsc.c8
-rw-r--r--net/sched/sch_htb.c8
-rw-r--r--net/sched/sch_mq.c2
-rw-r--r--net/sched/sch_multiq.c3
-rw-r--r--net/sched/sch_netem.c3
-rw-r--r--net/sched/sch_prio.c2
13 files changed, 28 insertions, 41 deletions
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
index eda8808fdacd..ea1f8a83160d 100644
--- a/include/net/sch_generic.h
+++ b/include/net/sch_generic.h
@@ -328,8 +328,7 @@ extern void qdisc_destroy(struct Qdisc *qdisc);
328extern void qdisc_tree_decrease_qlen(struct Qdisc *qdisc, unsigned int n); 328extern void qdisc_tree_decrease_qlen(struct Qdisc *qdisc, unsigned int n);
329extern struct Qdisc *qdisc_alloc(struct netdev_queue *dev_queue, 329extern struct Qdisc *qdisc_alloc(struct netdev_queue *dev_queue,
330 struct Qdisc_ops *ops); 330 struct Qdisc_ops *ops);
331extern struct Qdisc *qdisc_create_dflt(struct net_device *dev, 331extern struct Qdisc *qdisc_create_dflt(struct netdev_queue *dev_queue,
332 struct netdev_queue *dev_queue,
333 struct Qdisc_ops *ops, u32 parentid); 332 struct Qdisc_ops *ops, u32 parentid);
334extern void qdisc_calculate_pkt_len(struct sk_buff *skb, 333extern void qdisc_calculate_pkt_len(struct sk_buff *skb,
335 struct qdisc_size_table *stab); 334 struct qdisc_size_table *stab);
diff --git a/net/sched/sch_atm.c b/net/sched/sch_atm.c
index 6318e1136b83..282540778aa8 100644
--- a/net/sched/sch_atm.c
+++ b/net/sched/sch_atm.c
@@ -275,8 +275,7 @@ static int atm_tc_change(struct Qdisc *sch, u32 classid, u32 parent,
275 goto err_out; 275 goto err_out;
276 } 276 }
277 flow->filter_list = NULL; 277 flow->filter_list = NULL;
278 flow->q = qdisc_create_dflt(qdisc_dev(sch), sch->dev_queue, 278 flow->q = qdisc_create_dflt(sch->dev_queue, &pfifo_qdisc_ops, classid);
279 &pfifo_qdisc_ops, classid);
280 if (!flow->q) 279 if (!flow->q)
281 flow->q = &noop_qdisc; 280 flow->q = &noop_qdisc;
282 pr_debug("atm_tc_change: qdisc %p\n", flow->q); 281 pr_debug("atm_tc_change: qdisc %p\n", flow->q);
@@ -543,7 +542,7 @@ static int atm_tc_init(struct Qdisc *sch, struct nlattr *opt)
543 INIT_LIST_HEAD(&p->flows); 542 INIT_LIST_HEAD(&p->flows);
544 INIT_LIST_HEAD(&p->link.list); 543 INIT_LIST_HEAD(&p->link.list);
545 list_add(&p->link.list, &p->flows); 544 list_add(&p->link.list, &p->flows);
546 p->link.q = qdisc_create_dflt(qdisc_dev(sch), sch->dev_queue, 545 p->link.q = qdisc_create_dflt(sch->dev_queue,
547 &pfifo_qdisc_ops, sch->handle); 546 &pfifo_qdisc_ops, sch->handle);
548 if (!p->link.q) 547 if (!p->link.q)
549 p->link.q = &noop_qdisc; 548 p->link.q = &noop_qdisc;
diff --git a/net/sched/sch_cbq.c b/net/sched/sch_cbq.c
index 28c01ef5abc8..eb7631590865 100644
--- a/net/sched/sch_cbq.c
+++ b/net/sched/sch_cbq.c
@@ -1379,9 +1379,9 @@ static int cbq_init(struct Qdisc *sch, struct nlattr *opt)
1379 q->link.sibling = &q->link; 1379 q->link.sibling = &q->link;
1380 q->link.common.classid = sch->handle; 1380 q->link.common.classid = sch->handle;
1381 q->link.qdisc = sch; 1381 q->link.qdisc = sch;
1382 if (!(q->link.q = qdisc_create_dflt(qdisc_dev(sch), sch->dev_queue, 1382 q->link.q = qdisc_create_dflt(sch->dev_queue, &pfifo_qdisc_ops,
1383 &pfifo_qdisc_ops, 1383 sch->handle);
1384 sch->handle))) 1384 if (!q->link.q)
1385 q->link.q = &noop_qdisc; 1385 q->link.q = &noop_qdisc;
1386 1386
1387 q->link.priority = TC_CBQ_MAXPRIO-1; 1387 q->link.priority = TC_CBQ_MAXPRIO-1;
@@ -1623,7 +1623,7 @@ static int cbq_graft(struct Qdisc *sch, unsigned long arg, struct Qdisc *new,
1623 struct cbq_class *cl = (struct cbq_class*)arg; 1623 struct cbq_class *cl = (struct cbq_class*)arg;
1624 1624
1625 if (new == NULL) { 1625 if (new == NULL) {
1626 new = qdisc_create_dflt(qdisc_dev(sch), sch->dev_queue, 1626 new = qdisc_create_dflt(sch->dev_queue,
1627 &pfifo_qdisc_ops, cl->common.classid); 1627 &pfifo_qdisc_ops, cl->common.classid);
1628 if (new == NULL) 1628 if (new == NULL)
1629 return -ENOBUFS; 1629 return -ENOBUFS;
@@ -1874,8 +1874,8 @@ cbq_change_class(struct Qdisc *sch, u32 classid, u32 parentid, struct nlattr **t
1874 cl->R_tab = rtab; 1874 cl->R_tab = rtab;
1875 rtab = NULL; 1875 rtab = NULL;
1876 cl->refcnt = 1; 1876 cl->refcnt = 1;
1877 if (!(cl->q = qdisc_create_dflt(qdisc_dev(sch), sch->dev_queue, 1877 cl->q = qdisc_create_dflt(sch->dev_queue, &pfifo_qdisc_ops, classid);
1878 &pfifo_qdisc_ops, classid))) 1878 if (!cl->q)
1879 cl->q = &noop_qdisc; 1879 cl->q = &noop_qdisc;
1880 cl->common.classid = classid; 1880 cl->common.classid = classid;
1881 cl->tparent = parent; 1881 cl->tparent = parent;
diff --git a/net/sched/sch_drr.c b/net/sched/sch_drr.c
index b74046a95397..aa8b5313f8cf 100644
--- a/net/sched/sch_drr.c
+++ b/net/sched/sch_drr.c
@@ -110,7 +110,7 @@ static int drr_change_class(struct Qdisc *sch, u32 classid, u32 parentid,
110 cl->refcnt = 1; 110 cl->refcnt = 1;
111 cl->common.classid = classid; 111 cl->common.classid = classid;
112 cl->quantum = quantum; 112 cl->quantum = quantum;
113 cl->qdisc = qdisc_create_dflt(qdisc_dev(sch), sch->dev_queue, 113 cl->qdisc = qdisc_create_dflt(sch->dev_queue,
114 &pfifo_qdisc_ops, classid); 114 &pfifo_qdisc_ops, classid);
115 if (cl->qdisc == NULL) 115 if (cl->qdisc == NULL)
116 cl->qdisc = &noop_qdisc; 116 cl->qdisc = &noop_qdisc;
@@ -218,7 +218,7 @@ static int drr_graft_class(struct Qdisc *sch, unsigned long arg,
218 struct drr_class *cl = (struct drr_class *)arg; 218 struct drr_class *cl = (struct drr_class *)arg;
219 219
220 if (new == NULL) { 220 if (new == NULL) {
221 new = qdisc_create_dflt(qdisc_dev(sch), sch->dev_queue, 221 new = qdisc_create_dflt(sch->dev_queue,
222 &pfifo_qdisc_ops, cl->common.classid); 222 &pfifo_qdisc_ops, cl->common.classid);
223 if (new == NULL) 223 if (new == NULL)
224 new = &noop_qdisc; 224 new = &noop_qdisc;
diff --git a/net/sched/sch_dsmark.c b/net/sched/sch_dsmark.c
index 63d41f86679c..1d295d62bb5c 100644
--- a/net/sched/sch_dsmark.c
+++ b/net/sched/sch_dsmark.c
@@ -61,8 +61,7 @@ static int dsmark_graft(struct Qdisc *sch, unsigned long arg,
61 sch, p, new, old); 61 sch, p, new, old);
62 62
63 if (new == NULL) { 63 if (new == NULL) {
64 new = qdisc_create_dflt(qdisc_dev(sch), sch->dev_queue, 64 new = qdisc_create_dflt(sch->dev_queue, &pfifo_qdisc_ops,
65 &pfifo_qdisc_ops,
66 sch->handle); 65 sch->handle);
67 if (new == NULL) 66 if (new == NULL)
68 new = &noop_qdisc; 67 new = &noop_qdisc;
@@ -384,8 +383,7 @@ static int dsmark_init(struct Qdisc *sch, struct nlattr *opt)
384 p->default_index = default_index; 383 p->default_index = default_index;
385 p->set_tc_index = nla_get_flag(tb[TCA_DSMARK_SET_TC_INDEX]); 384 p->set_tc_index = nla_get_flag(tb[TCA_DSMARK_SET_TC_INDEX]);
386 385
387 p->q = qdisc_create_dflt(qdisc_dev(sch), sch->dev_queue, 386 p->q = qdisc_create_dflt(sch->dev_queue, &pfifo_qdisc_ops, sch->handle);
388 &pfifo_qdisc_ops, sch->handle);
389 if (p->q == NULL) 387 if (p->q == NULL)
390 p->q = &noop_qdisc; 388 p->q = &noop_qdisc;
391 389
diff --git a/net/sched/sch_fifo.c b/net/sched/sch_fifo.c
index 5948bafa8ce2..4dfecb0cba37 100644
--- a/net/sched/sch_fifo.c
+++ b/net/sched/sch_fifo.c
@@ -172,8 +172,7 @@ struct Qdisc *fifo_create_dflt(struct Qdisc *sch, struct Qdisc_ops *ops,
172 struct Qdisc *q; 172 struct Qdisc *q;
173 int err = -ENOMEM; 173 int err = -ENOMEM;
174 174
175 q = qdisc_create_dflt(qdisc_dev(sch), sch->dev_queue, 175 q = qdisc_create_dflt(sch->dev_queue, ops, TC_H_MAKE(sch->handle, 1));
176 ops, TC_H_MAKE(sch->handle, 1));
177 if (q) { 176 if (q) {
178 err = fifo_set_limit(q, limit); 177 err = fifo_set_limit(q, limit);
179 if (err < 0) { 178 if (err < 0) {
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
index 0abcc492fbf9..5dbb3cd96e59 100644
--- a/net/sched/sch_generic.c
+++ b/net/sched/sch_generic.c
@@ -576,10 +576,8 @@ errout:
576 return ERR_PTR(err); 576 return ERR_PTR(err);
577} 577}
578 578
579struct Qdisc * qdisc_create_dflt(struct net_device *dev, 579struct Qdisc *qdisc_create_dflt(struct netdev_queue *dev_queue,
580 struct netdev_queue *dev_queue, 580 struct Qdisc_ops *ops, unsigned int parentid)
581 struct Qdisc_ops *ops,
582 unsigned int parentid)
583{ 581{
584 struct Qdisc *sch; 582 struct Qdisc *sch;
585 583
@@ -684,7 +682,7 @@ static void attach_one_default_qdisc(struct net_device *dev,
684 struct Qdisc *qdisc; 682 struct Qdisc *qdisc;
685 683
686 if (dev->tx_queue_len) { 684 if (dev->tx_queue_len) {
687 qdisc = qdisc_create_dflt(dev, dev_queue, 685 qdisc = qdisc_create_dflt(dev_queue,
688 &pfifo_fast_ops, TC_H_ROOT); 686 &pfifo_fast_ops, TC_H_ROOT);
689 if (!qdisc) { 687 if (!qdisc) {
690 printk(KERN_INFO "%s: activation failed\n", dev->name); 688 printk(KERN_INFO "%s: activation failed\n", dev->name);
@@ -711,7 +709,7 @@ static void attach_default_qdiscs(struct net_device *dev)
711 dev->qdisc = txq->qdisc_sleeping; 709 dev->qdisc = txq->qdisc_sleeping;
712 atomic_inc(&dev->qdisc->refcnt); 710 atomic_inc(&dev->qdisc->refcnt);
713 } else { 711 } else {
714 qdisc = qdisc_create_dflt(dev, txq, &mq_qdisc_ops, TC_H_ROOT); 712 qdisc = qdisc_create_dflt(txq, &mq_qdisc_ops, TC_H_ROOT);
715 if (qdisc) { 713 if (qdisc) {
716 qdisc->ops->attach(qdisc); 714 qdisc->ops->attach(qdisc);
717 dev->qdisc = qdisc; 715 dev->qdisc = qdisc;
diff --git a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c
index 47496098d35c..069c62b7bb36 100644
--- a/net/sched/sch_hfsc.c
+++ b/net/sched/sch_hfsc.c
@@ -1088,7 +1088,7 @@ hfsc_change_class(struct Qdisc *sch, u32 classid, u32 parentid,
1088 cl->refcnt = 1; 1088 cl->refcnt = 1;
1089 cl->sched = q; 1089 cl->sched = q;
1090 cl->cl_parent = parent; 1090 cl->cl_parent = parent;
1091 cl->qdisc = qdisc_create_dflt(qdisc_dev(sch), sch->dev_queue, 1091 cl->qdisc = qdisc_create_dflt(sch->dev_queue,
1092 &pfifo_qdisc_ops, classid); 1092 &pfifo_qdisc_ops, classid);
1093 if (cl->qdisc == NULL) 1093 if (cl->qdisc == NULL)
1094 cl->qdisc = &noop_qdisc; 1094 cl->qdisc = &noop_qdisc;
@@ -1209,8 +1209,7 @@ hfsc_graft_class(struct Qdisc *sch, unsigned long arg, struct Qdisc *new,
1209 if (cl->level > 0) 1209 if (cl->level > 0)
1210 return -EINVAL; 1210 return -EINVAL;
1211 if (new == NULL) { 1211 if (new == NULL) {
1212 new = qdisc_create_dflt(qdisc_dev(sch), sch->dev_queue, 1212 new = qdisc_create_dflt(sch->dev_queue, &pfifo_qdisc_ops,
1213 &pfifo_qdisc_ops,
1214 cl->cl_common.classid); 1213 cl->cl_common.classid);
1215 if (new == NULL) 1214 if (new == NULL)
1216 new = &noop_qdisc; 1215 new = &noop_qdisc;
@@ -1452,8 +1451,7 @@ hfsc_init_qdisc(struct Qdisc *sch, struct nlattr *opt)
1452 q->root.cl_common.classid = sch->handle; 1451 q->root.cl_common.classid = sch->handle;
1453 q->root.refcnt = 1; 1452 q->root.refcnt = 1;
1454 q->root.sched = q; 1453 q->root.sched = q;
1455 q->root.qdisc = qdisc_create_dflt(qdisc_dev(sch), sch->dev_queue, 1454 q->root.qdisc = qdisc_create_dflt(sch->dev_queue, &pfifo_qdisc_ops,
1456 &pfifo_qdisc_ops,
1457 sch->handle); 1455 sch->handle);
1458 if (q->root.qdisc == NULL) 1456 if (q->root.qdisc == NULL)
1459 q->root.qdisc = &noop_qdisc; 1457 q->root.qdisc = &noop_qdisc;
diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c
index 87d944941867..01b519d6c52d 100644
--- a/net/sched/sch_htb.c
+++ b/net/sched/sch_htb.c
@@ -1121,8 +1121,7 @@ static int htb_graft(struct Qdisc *sch, unsigned long arg, struct Qdisc *new,
1121 if (cl->level) 1121 if (cl->level)
1122 return -EINVAL; 1122 return -EINVAL;
1123 if (new == NULL && 1123 if (new == NULL &&
1124 (new = qdisc_create_dflt(qdisc_dev(sch), sch->dev_queue, 1124 (new = qdisc_create_dflt(sch->dev_queue, &pfifo_qdisc_ops,
1125 &pfifo_qdisc_ops,
1126 cl->common.classid)) == NULL) 1125 cl->common.classid)) == NULL)
1127 return -ENOBUFS; 1126 return -ENOBUFS;
1128 1127
@@ -1247,8 +1246,7 @@ static int htb_delete(struct Qdisc *sch, unsigned long arg)
1247 return -EBUSY; 1246 return -EBUSY;
1248 1247
1249 if (!cl->level && htb_parent_last_child(cl)) { 1248 if (!cl->level && htb_parent_last_child(cl)) {
1250 new_q = qdisc_create_dflt(qdisc_dev(sch), sch->dev_queue, 1249 new_q = qdisc_create_dflt(sch->dev_queue, &pfifo_qdisc_ops,
1251 &pfifo_qdisc_ops,
1252 cl->parent->common.classid); 1250 cl->parent->common.classid);
1253 last_child = 1; 1251 last_child = 1;
1254 } 1252 }
@@ -1377,7 +1375,7 @@ static int htb_change_class(struct Qdisc *sch, u32 classid,
1377 /* create leaf qdisc early because it uses kmalloc(GFP_KERNEL) 1375 /* create leaf qdisc early because it uses kmalloc(GFP_KERNEL)
1378 so that can't be used inside of sch_tree_lock 1376 so that can't be used inside of sch_tree_lock
1379 -- thanks to Karlis Peisenieks */ 1377 -- thanks to Karlis Peisenieks */
1380 new_q = qdisc_create_dflt(qdisc_dev(sch), sch->dev_queue, 1378 new_q = qdisc_create_dflt(sch->dev_queue,
1381 &pfifo_qdisc_ops, classid); 1379 &pfifo_qdisc_ops, classid);
1382 sch_tree_lock(sch); 1380 sch_tree_lock(sch);
1383 if (parent && !parent->level) { 1381 if (parent && !parent->level) {
diff --git a/net/sched/sch_mq.c b/net/sched/sch_mq.c
index fe91e50f9d98..ecc302f4d2a1 100644
--- a/net/sched/sch_mq.c
+++ b/net/sched/sch_mq.c
@@ -56,7 +56,7 @@ static int mq_init(struct Qdisc *sch, struct nlattr *opt)
56 56
57 for (ntx = 0; ntx < dev->num_tx_queues; ntx++) { 57 for (ntx = 0; ntx < dev->num_tx_queues; ntx++) {
58 dev_queue = netdev_get_tx_queue(dev, ntx); 58 dev_queue = netdev_get_tx_queue(dev, ntx);
59 qdisc = qdisc_create_dflt(dev, dev_queue, &pfifo_fast_ops, 59 qdisc = qdisc_create_dflt(dev_queue, &pfifo_fast_ops,
60 TC_H_MAKE(TC_H_MAJ(sch->handle), 60 TC_H_MAKE(TC_H_MAJ(sch->handle),
61 TC_H_MIN(ntx + 1))); 61 TC_H_MIN(ntx + 1)));
62 if (qdisc == NULL) 62 if (qdisc == NULL)
diff --git a/net/sched/sch_multiq.c b/net/sched/sch_multiq.c
index 6ae251279fc2..32690deab5d0 100644
--- a/net/sched/sch_multiq.c
+++ b/net/sched/sch_multiq.c
@@ -227,8 +227,7 @@ static int multiq_tune(struct Qdisc *sch, struct nlattr *opt)
227 for (i = 0; i < q->bands; i++) { 227 for (i = 0; i < q->bands; i++) {
228 if (q->queues[i] == &noop_qdisc) { 228 if (q->queues[i] == &noop_qdisc) {
229 struct Qdisc *child, *old; 229 struct Qdisc *child, *old;
230 child = qdisc_create_dflt(qdisc_dev(sch), 230 child = qdisc_create_dflt(sch->dev_queue,
231 sch->dev_queue,
232 &pfifo_qdisc_ops, 231 &pfifo_qdisc_ops,
233 TC_H_MAKE(sch->handle, 232 TC_H_MAKE(sch->handle,
234 i + 1)); 233 i + 1));
diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c
index 4714ff162bbd..e5593c083a78 100644
--- a/net/sched/sch_netem.c
+++ b/net/sched/sch_netem.c
@@ -538,8 +538,7 @@ static int netem_init(struct Qdisc *sch, struct nlattr *opt)
538 538
539 qdisc_watchdog_init(&q->watchdog, sch); 539 qdisc_watchdog_init(&q->watchdog, sch);
540 540
541 q->qdisc = qdisc_create_dflt(qdisc_dev(sch), sch->dev_queue, 541 q->qdisc = qdisc_create_dflt(sch->dev_queue, &tfifo_qdisc_ops,
542 &tfifo_qdisc_ops,
543 TC_H_MAKE(sch->handle, 1)); 542 TC_H_MAKE(sch->handle, 1));
544 if (!q->qdisc) { 543 if (!q->qdisc) {
545 pr_debug("netem: qdisc create failed\n"); 544 pr_debug("netem: qdisc create failed\n");
diff --git a/net/sched/sch_prio.c b/net/sched/sch_prio.c
index 0748fb1e3a49..b1c95bce33ce 100644
--- a/net/sched/sch_prio.c
+++ b/net/sched/sch_prio.c
@@ -200,7 +200,7 @@ static int prio_tune(struct Qdisc *sch, struct nlattr *opt)
200 for (i=0; i<q->bands; i++) { 200 for (i=0; i<q->bands; i++) {
201 if (q->queues[i] == &noop_qdisc) { 201 if (q->queues[i] == &noop_qdisc) {
202 struct Qdisc *child, *old; 202 struct Qdisc *child, *old;
203 child = qdisc_create_dflt(qdisc_dev(sch), sch->dev_queue, 203 child = qdisc_create_dflt(sch->dev_queue,
204 &pfifo_qdisc_ops, 204 &pfifo_qdisc_ops,
205 TC_H_MAKE(sch->handle, i + 1)); 205 TC_H_MAKE(sch->handle, i + 1));
206 if (child) { 206 if (child) {