summaryrefslogtreecommitdiff
path: root/net/sched/sch_sfq.c
diff options
context:
space:
mode:
authorGeliang Tang <geliangtang@gmail.com>2017-03-24 17:14:36 +0300
committerDavid S. Miller <davem@davemloft.net>2017-03-25 00:42:52 +0300
commit3b1af93cf193ca4a94df5f01f480a9d820a194bb (patch)
tree45d13f8322a623acdebc49ca5c060867fae67a82 /net/sched/sch_sfq.c
parentff41c7fa64854cc95a472d43af82c17c043aa757 (diff)
downloadlinux-3b1af93cf193ca4a94df5f01f480a9d820a194bb.tar.xz
net_sched: use setup_deferrable_timer
Use setup_deferrable_timer() instead of init_timer_deferrable() to simplify the code. Signed-off-by: Geliang Tang <geliangtang@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/sch_sfq.c')
-rw-r--r--net/sched/sch_sfq.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/sched/sch_sfq.c b/net/sched/sch_sfq.c
index 42e8c8615e65..b00e02c139de 100644
--- a/net/sched/sch_sfq.c
+++ b/net/sched/sch_sfq.c
@@ -714,9 +714,8 @@ static int sfq_init(struct Qdisc *sch, struct nlattr *opt)
struct sfq_sched_data *q = qdisc_priv(sch);
int i;
- q->perturb_timer.function = sfq_perturbation;
- q->perturb_timer.data = (unsigned long)sch;
- init_timer_deferrable(&q->perturb_timer);
+ setup_deferrable_timer(&q->perturb_timer, sfq_perturbation,
+ (unsigned long)sch);
for (i = 0; i < SFQ_MAX_DEPTH + 1; i++) {
q->dep[i].next = i + SFQ_MAX_FLOWS;