[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200817085120.24894-6-allen.cryptic@gmail.com>
Date: Mon, 17 Aug 2020 14:21:18 +0530
From: Allen Pais <allen.cryptic@...il.com>
To: gerrit@....abdn.ac.uk, davem@...emloft.net, kuba@...nel.org,
edumazet@...gle.com, kuznet@....inr.ac.ru, yoshfuji@...ux-ipv6.org,
johannes@...solutions.net, alex.aring@...il.com,
stefan@...enfreihafen.org, santosh.shilimkar@...cle.com,
jhs@...atatu.com, xiyou.wangcong@...il.com, jiri@...nulli.us
Cc: keescook@...omium.org, netdev@...r.kernel.org,
linux-wireless@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-wpan@...r.kernel.org, linux-rdma@...r.kernel.org,
linux-s390@...r.kernel.org, Allen Pais <allen.lkml@...il.com>,
Romain Perier <romain.perier@...il.com>
Subject: [PATCH 6/8] net: sched: convert tasklets to use new tasklet_setup() API
From: Allen Pais <allen.lkml@...il.com>
In preparation for unconditionally passing the
struct tasklet_struct pointer to all tasklet
callbacks, switch to using the new tasklet_setup()
and from_tasklet() to pass the tasklet pointer explicitly.
Signed-off-by: Romain Perier <romain.perier@...il.com>
Signed-off-by: Allen Pais <allen.lkml@...il.com>
---
net/sched/sch_atm.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/net/sched/sch_atm.c b/net/sched/sch_atm.c
index 1c281cc81f57..0a4452178d5d 100644
--- a/net/sched/sch_atm.c
+++ b/net/sched/sch_atm.c
@@ -466,10 +466,11 @@ drop: __maybe_unused
* non-ATM interfaces.
*/
-static void sch_atm_dequeue(unsigned long data)
+static void sch_atm_dequeue(struct tasklet_struct *t)
{
- struct Qdisc *sch = (struct Qdisc *)data;
- struct atm_qdisc_data *p = qdisc_priv(sch);
+ struct atm_qdisc_data *p = from_tasklet(p, t, task);
+ struct Qdisc *sch = (struct Qdisc *)((char *) p -
+ QDISC_ALIGN(sizeof(struct Qdisc)));
struct atm_flow_data *flow;
struct sk_buff *skb;
@@ -563,7 +564,7 @@ static int atm_tc_init(struct Qdisc *sch, struct nlattr *opt,
if (err)
return err;
- tasklet_init(&p->task, sch_atm_dequeue, (unsigned long)sch);
+ tasklet_setup(&p->task, sch_atm_dequeue);
return 0;
}
--
2.17.1
Powered by blists - more mailing lists