[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200914072939.803280-11-allen.lkml@gmail.com>
Date: Mon, 14 Sep 2020 12:59:29 +0530
From: Allen Pais <allen.lkml@...il.com>
To: davem@...emloft.net
Cc: jes@...ined-monkey.org, kuba@...nel.org, dougmill@...ux.ibm.com,
cooldavid@...ldavid.org, mlindner@...vell.com,
stephen@...workplumber.org, borisp@...lanox.com,
netdev@...r.kernel.org, Allen Pais <apais@...ux.microsoft.com>,
Romain Perier <romain.perier@...il.com>
Subject: [net-next v3 10/20] ibmvnic: convert tasklets to use new tasklet_setup() API
From: Allen Pais <apais@...ux.microsoft.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 <apais@...ux.microsoft.com>
---
drivers/net/ethernet/ibm/ibmvnic.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
index d3a774331afc..1a3e65bae17f 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -4810,9 +4810,9 @@ static irqreturn_t ibmvnic_interrupt(int irq, void *instance)
return IRQ_HANDLED;
}
-static void ibmvnic_tasklet(void *data)
+static void ibmvnic_tasklet(struct tasklet_struct *t)
{
- struct ibmvnic_adapter *adapter = data;
+ struct ibmvnic_adapter *adapter = from_tasklet(adapter, t, tasklet);
struct ibmvnic_crq_queue *queue = &adapter->crq;
union ibmvnic_crq *crq;
unsigned long flags;
@@ -4947,8 +4947,7 @@ static int init_crq_queue(struct ibmvnic_adapter *adapter)
retrc = 0;
- tasklet_init(&adapter->tasklet, (void *)ibmvnic_tasklet,
- (unsigned long)adapter);
+ tasklet_setup(&adapter->tasklet, (void *)ibmvnic_tasklet);
netdev_dbg(adapter->netdev, "registering irq 0x%x\n", vdev->irq);
snprintf(crq->name, sizeof(crq->name), "ibmvnic-%x",
--
2.25.1
Powered by blists - more mailing lists