All of lore.kernel.org
 help / color / mirror / Atom feed
From: Allen Pais <allen.lkml@gmail.com>
To: shawnguo@kernel.org, s.hauer@pengutronix.de,
	kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com,
	ast@kernel.org, daniel@iogearbox.net, kafai@fb.com,
	songliubraving@fb.com, yhs@fb.com, andriin@fb.com,
	john.fastabend@gmail.com, kpsingh@chromium.org,
	baohua@kernel.org, mripard@kernel.org, wens@csie.org,
	thierry.reding@gmail.com, jonathanh@nvidia.com,
	michal.simek@xilinx.com, matthias.bgg@gmail.com
Cc: keescook@chromium.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org,
	bpf@vger.kernel.org, linux-tegra@vger.kernel.org,
	linux-mediatek@lists.infradead.org,
	Allen Pais <allen.lkml@gmail.com>,
	Romain Perier <romain.perier@gmail.com>
Subject: [PATCH 16/35] dma: mv_xor: convert tasklets to use new tasklet_setup() API
Date: Mon, 17 Aug 2020 13:47:07 +0530	[thread overview]
Message-ID: <20200817081726.20213-17-allen.lkml@gmail.com> (raw)
In-Reply-To: <20200817081726.20213-1-allen.lkml@gmail.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@gmail.com>
Signed-off-by: Allen Pais <allen.lkml@gmail.com>
---
 drivers/dma/mv_xor.c    | 7 +++----
 drivers/dma/mv_xor_v2.c | 8 ++++----
 2 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/drivers/dma/mv_xor.c b/drivers/dma/mv_xor.c
index 0ac8e7b34e12..00cd1335eeba 100644
--- a/drivers/dma/mv_xor.c
+++ b/drivers/dma/mv_xor.c
@@ -336,9 +336,9 @@ static void mv_chan_slot_cleanup(struct mv_xor_chan *mv_chan)
 		mv_chan->dmachan.completed_cookie = cookie;
 }
 
-static void mv_xor_tasklet(unsigned long data)
+static void mv_xor_tasklet(struct tasklet_struct *t)
 {
-	struct mv_xor_chan *chan = (struct mv_xor_chan *) data;
+	struct mv_xor_chan *chan = from_tasklet(chan, t, irq_tasklet);
 
 	spin_lock(&chan->lock);
 	mv_chan_slot_cleanup(chan);
@@ -1097,8 +1097,7 @@ mv_xor_channel_add(struct mv_xor_device *xordev,
 
 	mv_chan->mmr_base = xordev->xor_base;
 	mv_chan->mmr_high_base = xordev->xor_high_base;
-	tasklet_init(&mv_chan->irq_tasklet, mv_xor_tasklet, (unsigned long)
-		     mv_chan);
+	tasklet_setup(&mv_chan->irq_tasklet, mv_xor_tasklet);
 
 	/* clear errors before enabling interrupts */
 	mv_chan_clear_err_status(mv_chan);
diff --git a/drivers/dma/mv_xor_v2.c b/drivers/dma/mv_xor_v2.c
index 9225f08dfee9..2753a6b916f6 100644
--- a/drivers/dma/mv_xor_v2.c
+++ b/drivers/dma/mv_xor_v2.c
@@ -553,9 +553,10 @@ int mv_xor_v2_get_pending_params(struct mv_xor_v2_device *xor_dev,
 /*
  * handle the descriptors after HW process
  */
-static void mv_xor_v2_tasklet(unsigned long data)
+static void mv_xor_v2_tasklet(struct tasklet_struct *t)
 {
-	struct mv_xor_v2_device *xor_dev = (struct mv_xor_v2_device *) data;
+	struct mv_xor_v2_device *xor_dev = from_tasklet(xor_dev, t,
+							irq_tasklet);
 	int pending_ptr, num_of_pending, i;
 	struct mv_xor_v2_sw_desc *next_pending_sw_desc = NULL;
 
@@ -780,8 +781,7 @@ static int mv_xor_v2_probe(struct platform_device *pdev)
 	if (ret)
 		goto free_msi_irqs;
 
-	tasklet_init(&xor_dev->irq_tasklet, mv_xor_v2_tasklet,
-		     (unsigned long) xor_dev);
+	tasklet_setup(&xor_dev->irq_tasklet, mv_xor_v2_tasklet);
 
 	xor_dev->desc_size = mv_xor_v2_set_desc_size(xor_dev);
 
-- 
2.17.1


WARNING: multiple messages have this Message-ID (diff)
From: Allen Pais <allen.lkml@gmail.com>
To: shawnguo@kernel.org, s.hauer@pengutronix.de,
	kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com,
	ast@kernel.org, daniel@iogearbox.net, kafai@fb.com,
	songliubraving@fb.com, yhs@fb.com, andriin@fb.com,
	john.fastabend@gmail.com, kpsingh@chromium.org,
	baohua@kernel.org, mripard@kernel.org, wens@csie.org,
	thierry.reding@gmail.com, jonathanh@nvidia.com,
	michal.simek@xilinx.com, matthias.bgg@gmail.com
Cc: keescook@chromium.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, Allen Pais <allen.lkml@gmail.com>,
	linux-mediatek@lists.infradead.org, linux-tegra@vger.kernel.org,
	bpf@vger.kernel.org, Romain Perier <romain.perier@gmail.com>,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH 16/35] dma: mv_xor: convert tasklets to use new tasklet_setup() API
Date: Mon, 17 Aug 2020 13:47:07 +0530	[thread overview]
Message-ID: <20200817081726.20213-17-allen.lkml@gmail.com> (raw)
In-Reply-To: <20200817081726.20213-1-allen.lkml@gmail.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@gmail.com>
Signed-off-by: Allen Pais <allen.lkml@gmail.com>
---
 drivers/dma/mv_xor.c    | 7 +++----
 drivers/dma/mv_xor_v2.c | 8 ++++----
 2 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/drivers/dma/mv_xor.c b/drivers/dma/mv_xor.c
index 0ac8e7b34e12..00cd1335eeba 100644
--- a/drivers/dma/mv_xor.c
+++ b/drivers/dma/mv_xor.c
@@ -336,9 +336,9 @@ static void mv_chan_slot_cleanup(struct mv_xor_chan *mv_chan)
 		mv_chan->dmachan.completed_cookie = cookie;
 }
 
-static void mv_xor_tasklet(unsigned long data)
+static void mv_xor_tasklet(struct tasklet_struct *t)
 {
-	struct mv_xor_chan *chan = (struct mv_xor_chan *) data;
+	struct mv_xor_chan *chan = from_tasklet(chan, t, irq_tasklet);
 
 	spin_lock(&chan->lock);
 	mv_chan_slot_cleanup(chan);
@@ -1097,8 +1097,7 @@ mv_xor_channel_add(struct mv_xor_device *xordev,
 
 	mv_chan->mmr_base = xordev->xor_base;
 	mv_chan->mmr_high_base = xordev->xor_high_base;
-	tasklet_init(&mv_chan->irq_tasklet, mv_xor_tasklet, (unsigned long)
-		     mv_chan);
+	tasklet_setup(&mv_chan->irq_tasklet, mv_xor_tasklet);
 
 	/* clear errors before enabling interrupts */
 	mv_chan_clear_err_status(mv_chan);
diff --git a/drivers/dma/mv_xor_v2.c b/drivers/dma/mv_xor_v2.c
index 9225f08dfee9..2753a6b916f6 100644
--- a/drivers/dma/mv_xor_v2.c
+++ b/drivers/dma/mv_xor_v2.c
@@ -553,9 +553,10 @@ int mv_xor_v2_get_pending_params(struct mv_xor_v2_device *xor_dev,
 /*
  * handle the descriptors after HW process
  */
-static void mv_xor_v2_tasklet(unsigned long data)
+static void mv_xor_v2_tasklet(struct tasklet_struct *t)
 {
-	struct mv_xor_v2_device *xor_dev = (struct mv_xor_v2_device *) data;
+	struct mv_xor_v2_device *xor_dev = from_tasklet(xor_dev, t,
+							irq_tasklet);
 	int pending_ptr, num_of_pending, i;
 	struct mv_xor_v2_sw_desc *next_pending_sw_desc = NULL;
 
@@ -780,8 +781,7 @@ static int mv_xor_v2_probe(struct platform_device *pdev)
 	if (ret)
 		goto free_msi_irqs;
 
-	tasklet_init(&xor_dev->irq_tasklet, mv_xor_v2_tasklet,
-		     (unsigned long) xor_dev);
+	tasklet_setup(&xor_dev->irq_tasklet, mv_xor_v2_tasklet);
 
 	xor_dev->desc_size = mv_xor_v2_set_desc_size(xor_dev);
 
-- 
2.17.1


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

WARNING: multiple messages have this Message-ID (diff)
From: Allen Pais <allen.lkml@gmail.com>
To: shawnguo@kernel.org, s.hauer@pengutronix.de,
	kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com,
	ast@kernel.org, daniel@iogearbox.net, kafai@fb.com,
	songliubraving@fb.com, yhs@fb.com, andriin@fb.com,
	john.fastabend@gmail.com, kpsingh@chromium.org,
	baohua@kernel.org, mripard@kernel.org, wens@csie.org,
	thierry.reding@gmail.com, jonathanh@nvidia.com,
	michal.simek@xilinx.com, matthias.bgg@gmail.com
Cc: keescook@chromium.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, Allen Pais <allen.lkml@gmail.com>,
	linux-mediatek@lists.infradead.org, linux-tegra@vger.kernel.org,
	bpf@vger.kernel.org, Romain Perier <romain.perier@gmail.com>,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH 16/35] dma: mv_xor: convert tasklets to use new tasklet_setup() API
Date: Mon, 17 Aug 2020 13:47:07 +0530	[thread overview]
Message-ID: <20200817081726.20213-17-allen.lkml@gmail.com> (raw)
In-Reply-To: <20200817081726.20213-1-allen.lkml@gmail.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@gmail.com>
Signed-off-by: Allen Pais <allen.lkml@gmail.com>
---
 drivers/dma/mv_xor.c    | 7 +++----
 drivers/dma/mv_xor_v2.c | 8 ++++----
 2 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/drivers/dma/mv_xor.c b/drivers/dma/mv_xor.c
index 0ac8e7b34e12..00cd1335eeba 100644
--- a/drivers/dma/mv_xor.c
+++ b/drivers/dma/mv_xor.c
@@ -336,9 +336,9 @@ static void mv_chan_slot_cleanup(struct mv_xor_chan *mv_chan)
 		mv_chan->dmachan.completed_cookie = cookie;
 }
 
-static void mv_xor_tasklet(unsigned long data)
+static void mv_xor_tasklet(struct tasklet_struct *t)
 {
-	struct mv_xor_chan *chan = (struct mv_xor_chan *) data;
+	struct mv_xor_chan *chan = from_tasklet(chan, t, irq_tasklet);
 
 	spin_lock(&chan->lock);
 	mv_chan_slot_cleanup(chan);
@@ -1097,8 +1097,7 @@ mv_xor_channel_add(struct mv_xor_device *xordev,
 
 	mv_chan->mmr_base = xordev->xor_base;
 	mv_chan->mmr_high_base = xordev->xor_high_base;
-	tasklet_init(&mv_chan->irq_tasklet, mv_xor_tasklet, (unsigned long)
-		     mv_chan);
+	tasklet_setup(&mv_chan->irq_tasklet, mv_xor_tasklet);
 
 	/* clear errors before enabling interrupts */
 	mv_chan_clear_err_status(mv_chan);
diff --git a/drivers/dma/mv_xor_v2.c b/drivers/dma/mv_xor_v2.c
index 9225f08dfee9..2753a6b916f6 100644
--- a/drivers/dma/mv_xor_v2.c
+++ b/drivers/dma/mv_xor_v2.c
@@ -553,9 +553,10 @@ int mv_xor_v2_get_pending_params(struct mv_xor_v2_device *xor_dev,
 /*
  * handle the descriptors after HW process
  */
-static void mv_xor_v2_tasklet(unsigned long data)
+static void mv_xor_v2_tasklet(struct tasklet_struct *t)
 {
-	struct mv_xor_v2_device *xor_dev = (struct mv_xor_v2_device *) data;
+	struct mv_xor_v2_device *xor_dev = from_tasklet(xor_dev, t,
+							irq_tasklet);
 	int pending_ptr, num_of_pending, i;
 	struct mv_xor_v2_sw_desc *next_pending_sw_desc = NULL;
 
@@ -780,8 +781,7 @@ static int mv_xor_v2_probe(struct platform_device *pdev)
 	if (ret)
 		goto free_msi_irqs;
 
-	tasklet_init(&xor_dev->irq_tasklet, mv_xor_v2_tasklet,
-		     (unsigned long) xor_dev);
+	tasklet_setup(&xor_dev->irq_tasklet, mv_xor_v2_tasklet);
 
 	xor_dev->desc_size = mv_xor_v2_set_desc_size(xor_dev);
 
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2020-08-17  8:20 UTC|newest]

Thread overview: 110+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-17  8:16 [PATCH 00/35] dma: convert tasklets to use new tasklet_setup() Allen Pais
2020-08-17  8:16 ` Allen Pais
2020-08-17  8:16 ` Allen Pais
2020-08-17  8:16 ` [PATCH 01/35] dma: altera-msgdma: convert tasklets to use new tasklet_setup() API Allen Pais
2020-08-17  8:16   ` Allen Pais
2020-08-17  8:16   ` Allen Pais
2020-08-17  8:16 ` [PATCH 02/35] dma: at_hdmac: " Allen Pais
2020-08-17  8:16   ` Allen Pais
2020-08-17  8:16   ` Allen Pais
2020-08-17  8:16 ` [PATCH 03/35] dma: at_xdmac: " Allen Pais
2020-08-17  8:16   ` Allen Pais
2020-08-17  8:16   ` Allen Pais
2020-08-17 12:17   ` kernel test robot
2020-08-17  8:16 ` [PATCH 04/35] dma: coh901318: " Allen Pais
2020-08-17  8:16   ` Allen Pais
2020-08-17  8:16   ` Allen Pais
2020-08-17  8:16 ` [PATCH 05/35] dma: dw: " Allen Pais
2020-08-17  8:16   ` Allen Pais
2020-08-17  8:16   ` Allen Pais
2020-08-17  8:16 ` [PATCH 06/35] dma: ep93xx: " Allen Pais
2020-08-17  8:16   ` Allen Pais
2020-08-17  8:16   ` Allen Pais
2020-08-17  8:16 ` [PATCH 07/35] dma: fsl: " Allen Pais
2020-08-17  8:16   ` Allen Pais
2020-08-17  8:16   ` Allen Pais
2020-08-17  8:16 ` [PATCH 08/35] dma: imx-dma: " Allen Pais
2020-08-17  8:16   ` Allen Pais
2020-08-17  8:16   ` Allen Pais
2020-08-17  8:17 ` [PATCH 09/35] dma: ioat: " Allen Pais
2020-08-17  8:17   ` Allen Pais
2020-08-17  8:17   ` Allen Pais
2020-08-17  8:17 ` [PATCH 10/35] dma: iop_adma: " Allen Pais
2020-08-17  8:17   ` Allen Pais
2020-08-17  8:17   ` Allen Pais
2020-08-17  8:17 ` [PATCH 11/35] dma: ipu: " Allen Pais
2020-08-17  8:17   ` Allen Pais
2020-08-17  8:17   ` Allen Pais
2020-08-17  8:17 ` [PATCH 12/35] dma: k3dma: " Allen Pais
2020-08-17  8:17   ` Allen Pais
2020-08-17  8:17   ` Allen Pais
2020-08-17  8:17 ` [PATCH 13/35] dma: mediatek: " Allen Pais
2020-08-17  8:17   ` Allen Pais
2020-08-17  8:17   ` Allen Pais
2020-08-17  8:17 ` [PATCH 14/35] dma: mmp: " Allen Pais
2020-08-17  8:17   ` Allen Pais
2020-08-17  8:17   ` Allen Pais
2020-08-17  8:17 ` [PATCH 15/35] dma: mpc512x: " Allen Pais
2020-08-17  8:17   ` Allen Pais
2020-08-17  8:17   ` Allen Pais
2020-08-17  8:17 ` Allen Pais [this message]
2020-08-17  8:17   ` [PATCH 16/35] dma: mv_xor: " Allen Pais
2020-08-17  8:17   ` Allen Pais
2020-08-17  8:17 ` [PATCH 17/35] dma: mxs-dma: " Allen Pais
2020-08-17  8:17   ` Allen Pais
2020-08-17  8:17   ` Allen Pais
2020-08-17  8:17 ` [PATCH 18/35] dma: nbpfaxi: " Allen Pais
2020-08-17  8:17   ` Allen Pais
2020-08-17  8:17   ` Allen Pais
2020-08-17  8:17 ` [PATCH 19/35] dma: pch_dma: " Allen Pais
2020-08-17  8:17   ` Allen Pais
2020-08-17  8:17   ` Allen Pais
2020-08-17  8:17 ` [PATCH 20/35] dma: pl330: " Allen Pais
2020-08-17  8:17   ` Allen Pais
2020-08-17  8:17   ` Allen Pais
2020-08-17  8:17 ` [PATCH 21/35] dma: ppc4xx: " Allen Pais
2020-08-17  8:17   ` Allen Pais
2020-08-17  8:17   ` Allen Pais
2020-08-17  8:17 ` [PATCH 22/35] dma: qcom: " Allen Pais
2020-08-17  8:17   ` Allen Pais
2020-08-17  8:17   ` Allen Pais
2020-08-17  8:17 ` [PATCH 23/35] dma: sa11x0: " Allen Pais
2020-08-17  8:17   ` Allen Pais
2020-08-17  8:17   ` Allen Pais
2020-08-17  8:17 ` [PATCH 24/35] dma: sirf-dma: " Allen Pais
2020-08-17  8:17   ` Allen Pais
2020-08-17  8:17   ` Allen Pais
2020-08-17  8:17 ` [PATCH 25/35] dma: ste_dma40: " Allen Pais
2020-08-17  8:17   ` Allen Pais
2020-08-17  8:17   ` Allen Pais
2020-08-17  8:17 ` [PATCH 26/35] dma: sun6i: " Allen Pais
2020-08-17  8:17   ` Allen Pais
2020-08-17  8:17   ` Allen Pais
2020-08-17  8:17 ` [PATCH 27/35] dma: tegra20: " Allen Pais
2020-08-17  8:17   ` Allen Pais
2020-08-17  8:17   ` Allen Pais
2020-08-17  8:17 ` [PATCH 28/35] dma: timb_dma: " Allen Pais
2020-08-17  8:17   ` Allen Pais
2020-08-17  8:17   ` Allen Pais
2020-08-17  8:17 ` [PATCH 29/35] dma: txx9dmac: " Allen Pais
2020-08-17  8:17   ` Allen Pais
2020-08-17  8:17   ` Allen Pais
2020-08-17  8:17 ` [PATCH 30/35] dma: virt-dma: " Allen Pais
2020-08-17  8:17   ` Allen Pais
2020-08-17  8:17   ` Allen Pais
2020-08-17  8:17 ` [PATCH 31/35] dma: xgene: " Allen Pais
2020-08-17  8:17   ` Allen Pais
2020-08-17  8:17   ` Allen Pais
2020-08-17  8:17 ` [PATCH 32/35] dma: xilinx: " Allen Pais
2020-08-17  8:17   ` Allen Pais
2020-08-17  8:17   ` Allen Pais
2020-08-17  8:17 ` [PATCH 33/35] dma: plx_dma: " Allen Pais
2020-08-17  8:17   ` Allen Pais
2020-08-17  8:17   ` Allen Pais
2020-08-17  8:17 ` [PATCH 34/35] dma: sf-pdma: " Allen Pais
2020-08-17  8:17   ` Allen Pais
2020-08-17  8:17   ` Allen Pais
2020-08-17  8:17 ` [PATCH 35/35] dma: k3-udma: " Allen Pais
2020-08-17  8:17   ` Allen Pais
2020-08-17  8:17   ` Allen Pais
2020-08-18  9:06 [PATCH 00/35] dma: convert tasklets to use new tasklet_setup() Allen Pais
2020-08-18  9:06 ` [PATCH 16/35] dma: mv_xor: convert tasklets to use new tasklet_setup() API Allen Pais

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200817081726.20213-17-allen.lkml@gmail.com \
    --to=allen.lkml@gmail.com \
    --cc=andriin@fb.com \
    --cc=ast@kernel.org \
    --cc=baohua@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=festevam@gmail.com \
    --cc=john.fastabend@gmail.com \
    --cc=jonathanh@nvidia.com \
    --cc=kafai@fb.com \
    --cc=keescook@chromium.org \
    --cc=kernel@pengutronix.de \
    --cc=kpsingh@chromium.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=matthias.bgg@gmail.com \
    --cc=michal.simek@xilinx.com \
    --cc=mripard@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=romain.perier@gmail.com \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=songliubraving@fb.com \
    --cc=thierry.reding@gmail.com \
    --cc=wens@csie.org \
    --cc=yhs@fb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.