diff options
| author | David S. Miller <davem@davemloft.net> | 2017-10-18 12:40:40 +0100 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2017-10-18 12:40:40 +0100 |
| commit | 2af55f460738c78e63596e320f6dbde0cd4cfb84 (patch) | |
| tree | 149c0e1ec9e7711d559c76ea0e5d82893d92b168 /net/sched/sch_pie.c | |
| parent | 1bbc728988f09e40c83585cf3322b1f6c1aa17b5 (diff) | |
| parent | ff861c4d64f2df1c7eaabaf2ba8f2f8ebc4b28e3 (diff) | |
Merge branch 'networking-Convert-timers-to-use-timer_setup'
Kees Cook says:
====================
networking: Convert timers to use timer_setup()
This is the current set of outstanding networking patches to perform
conversions to the new timer interface (rebased to -next). This is not
all expected conversions, but it contains everything needed in networking
to eliminate init_timer(), and all the non-standard setup_*_timer() uses.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/sch_pie.c')
| -rw-r--r-- | net/sched/sch_pie.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/net/sched/sch_pie.c b/net/sched/sch_pie.c index 6c2791d6102d..776c694c77c7 100644 --- a/net/sched/sch_pie.c +++ b/net/sched/sch_pie.c @@ -74,6 +74,7 @@ struct pie_sched_data { struct pie_vars vars; struct pie_stats stats; struct timer_list adapt_timer; + struct Qdisc *sch; }; static void pie_params_init(struct pie_params *params) @@ -422,10 +423,10 @@ static void calculate_probability(struct Qdisc *sch) pie_vars_init(&q->vars); } -static void pie_timer(unsigned long arg) +static void pie_timer(struct timer_list *t) { - struct Qdisc *sch = (struct Qdisc *)arg; - struct pie_sched_data *q = qdisc_priv(sch); + struct pie_sched_data *q = from_timer(q, t, adapt_timer); + struct Qdisc *sch = q->sch; spinlock_t *root_lock = qdisc_lock(qdisc_root_sleeping(sch)); spin_lock(root_lock); @@ -446,7 +447,8 @@ static int pie_init(struct Qdisc *sch, struct nlattr *opt) pie_vars_init(&q->vars); sch->limit = q->params.limit; - setup_timer(&q->adapt_timer, pie_timer, (unsigned long)sch); + q->sch = sch; + timer_setup(&q->adapt_timer, pie_timer, 0); if (opt) { int err = pie_change(sch, opt); |
