All of lore.kernel.org
 help / color / mirror / Atom feed
From: Allen Pais <allen.lkml@gmail.com>
To: ludovic.desroches@microchip.com, ulf.hansson@linaro.org,
	manuel.lauss@gmail.com, mirq-linux@rere.qmqm.pl,
	jh80.chung@samsung.com, oakad@yahoo.com,
	yamada.masahiro@socionext.com, brucechang@via.com.tw,
	HaraldWelte@viatech.com
Cc: keescook@chromium.org, inux-mmc@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org,
	Allen Pais <allen.lkml@gmail.com>,
	Romain Perier <romain.perier@gmail.com>
Subject: [PATCH 09/10] mmc: uniphier: convert tasklets to use new tasklet_setup() API
Date: Mon, 17 Aug 2020 14:05:07 +0530	[thread overview]
Message-ID: <20200817083508.22657-10-allen.lkml@gmail.com> (raw)
In-Reply-To: <20200817083508.22657-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/mmc/host/uniphier-sd.c | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/drivers/mmc/host/uniphier-sd.c b/drivers/mmc/host/uniphier-sd.c
index f82baf99fd69..c822bb7beaca 100644
--- a/drivers/mmc/host/uniphier-sd.c
+++ b/drivers/mmc/host/uniphier-sd.c
@@ -81,9 +81,9 @@ static void uniphier_sd_dma_endisable(struct tmio_mmc_host *host, int enable)
 }
 
 /* external DMA engine */
-static void uniphier_sd_external_dma_issue(unsigned long arg)
+static void uniphier_sd_external_dma_issue(struct tasklet_struct *t)
 {
-	struct tmio_mmc_host *host = (void *)arg;
+	struct tmio_mmc_host *host = from_tasklet(host, t, dma_issue);
 	struct uniphier_sd_priv *priv = uniphier_sd_priv(host);
 
 	uniphier_sd_dma_endisable(host, 1);
@@ -190,8 +190,7 @@ static void uniphier_sd_external_dma_request(struct tmio_mmc_host *host,
 	host->chan_rx = chan;
 	host->chan_tx = chan;
 
-	tasklet_init(&host->dma_issue, uniphier_sd_external_dma_issue,
-		     (unsigned long)host);
+	tasklet_setup(&host->dma_issue, uniphier_sd_external_dma_issue);
 }
 
 static void uniphier_sd_external_dma_release(struct tmio_mmc_host *host)
@@ -228,9 +227,9 @@ static const struct tmio_mmc_dma_ops uniphier_sd_external_dma_ops = {
 	.dataend = uniphier_sd_external_dma_dataend,
 };
 
-static void uniphier_sd_internal_dma_issue(unsigned long arg)
+static void uniphier_sd_internal_dma_issue(struct tasklet_struct *t)
 {
-	struct tmio_mmc_host *host = (void *)arg;
+	struct tmio_mmc_host *host = from_tasklet(host, t, dma_issue);
 	unsigned long flags;
 
 	spin_lock_irqsave(&host->lock, flags);
@@ -309,8 +308,7 @@ static void uniphier_sd_internal_dma_request(struct tmio_mmc_host *host,
 
 	host->chan_tx = (void *)0xdeadbeaf;
 
-	tasklet_init(&host->dma_issue, uniphier_sd_internal_dma_issue,
-		     (unsigned long)host);
+	tasklet_setup(&host->dma_issue, uniphier_sd_internal_dma_issue);
 }
 
 static void uniphier_sd_internal_dma_release(struct tmio_mmc_host *host)
-- 
2.17.1


WARNING: multiple messages have this Message-ID (diff)
From: Allen Pais <allen.lkml@gmail.com>
To: ludovic.desroches@microchip.com, ulf.hansson@linaro.org,
	manuel.lauss@gmail.com, mirq-linux@rere.qmqm.pl,
	jh80.chung@samsung.com, oakad@yahoo.com,
	yamada.masahiro@socionext.com, brucechang@via.com.tw,
	HaraldWelte@viatech.com
Cc: inux-mmc@vger.kernel.org, Romain Perier <romain.perier@gmail.com>,
	keescook@chromium.org, Allen Pais <allen.lkml@gmail.com>,
	linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH 09/10] mmc: uniphier: convert tasklets to use new tasklet_setup() API
Date: Mon, 17 Aug 2020 14:05:07 +0530	[thread overview]
Message-ID: <20200817083508.22657-10-allen.lkml@gmail.com> (raw)
In-Reply-To: <20200817083508.22657-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/mmc/host/uniphier-sd.c | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/drivers/mmc/host/uniphier-sd.c b/drivers/mmc/host/uniphier-sd.c
index f82baf99fd69..c822bb7beaca 100644
--- a/drivers/mmc/host/uniphier-sd.c
+++ b/drivers/mmc/host/uniphier-sd.c
@@ -81,9 +81,9 @@ static void uniphier_sd_dma_endisable(struct tmio_mmc_host *host, int enable)
 }
 
 /* external DMA engine */
-static void uniphier_sd_external_dma_issue(unsigned long arg)
+static void uniphier_sd_external_dma_issue(struct tasklet_struct *t)
 {
-	struct tmio_mmc_host *host = (void *)arg;
+	struct tmio_mmc_host *host = from_tasklet(host, t, dma_issue);
 	struct uniphier_sd_priv *priv = uniphier_sd_priv(host);
 
 	uniphier_sd_dma_endisable(host, 1);
@@ -190,8 +190,7 @@ static void uniphier_sd_external_dma_request(struct tmio_mmc_host *host,
 	host->chan_rx = chan;
 	host->chan_tx = chan;
 
-	tasklet_init(&host->dma_issue, uniphier_sd_external_dma_issue,
-		     (unsigned long)host);
+	tasklet_setup(&host->dma_issue, uniphier_sd_external_dma_issue);
 }
 
 static void uniphier_sd_external_dma_release(struct tmio_mmc_host *host)
@@ -228,9 +227,9 @@ static const struct tmio_mmc_dma_ops uniphier_sd_external_dma_ops = {
 	.dataend = uniphier_sd_external_dma_dataend,
 };
 
-static void uniphier_sd_internal_dma_issue(unsigned long arg)
+static void uniphier_sd_internal_dma_issue(struct tasklet_struct *t)
 {
-	struct tmio_mmc_host *host = (void *)arg;
+	struct tmio_mmc_host *host = from_tasklet(host, t, dma_issue);
 	unsigned long flags;
 
 	spin_lock_irqsave(&host->lock, flags);
@@ -309,8 +308,7 @@ static void uniphier_sd_internal_dma_request(struct tmio_mmc_host *host,
 
 	host->chan_tx = (void *)0xdeadbeaf;
 
-	tasklet_init(&host->dma_issue, uniphier_sd_internal_dma_issue,
-		     (unsigned long)host);
+	tasklet_setup(&host->dma_issue, uniphier_sd_internal_dma_issue);
 }
 
 static void uniphier_sd_internal_dma_release(struct tmio_mmc_host *host)
-- 
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:36 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-17  8:34 [PATCH 00/10] mmc: convert tasklets to use new tasklet_setup() Allen Pais
2020-08-17  8:34 ` Allen Pais
2020-08-17  8:34 ` [PATCH 01/10] mmc: atmel-mci: convert tasklets to use new tasklet_setup() API Allen Pais
2020-08-17  8:34   ` Allen Pais
2020-08-17  8:35 ` [PATCH 02/10] mmc: au1xmmc: " Allen Pais
2020-08-17  8:35   ` Allen Pais
2020-08-17  8:35 ` [PATCH 03/10] mmc: cb710: " Allen Pais
2020-08-17  8:35   ` Allen Pais
2020-08-17  8:35 ` [PATCH 04/10] mmc: dw_mmc: " Allen Pais
2020-08-17  8:35   ` Allen Pais
2020-08-17  8:35 ` [PATCH 05/10] mmc: omap: " Allen Pais
2020-08-17  8:35   ` Allen Pais
2020-08-17  8:35 ` [PATCH 06/10] mmc: renesas: " Allen Pais
2020-08-17  8:35   ` Allen Pais
2020-08-17  8:35 ` [PATCH 07/10] mmc: s3cmci: " Allen Pais
2020-08-17  8:35   ` Allen Pais
2020-08-17  8:35 ` [PATCH 08/10] mmc: tifm_sd: " Allen Pais
2020-08-17  8:35   ` Allen Pais
2020-08-17  8:35 ` Allen Pais [this message]
2020-08-17  8:35   ` [PATCH 09/10] mmc: uniphier: " Allen Pais
2020-08-17 12:53 ` [PATCH 00/10] mmc: convert tasklets to use new tasklet_setup() Masahiro Yamada
2020-08-17 12:53   ` Masahiro Yamada
2020-08-17 19:31   ` Kees Cook
2020-08-17 19:31     ` Kees Cook

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=20200817083508.22657-10-allen.lkml@gmail.com \
    --to=allen.lkml@gmail.com \
    --cc=HaraldWelte@viatech.com \
    --cc=brucechang@via.com.tw \
    --cc=inux-mmc@vger.kernel.org \
    --cc=jh80.chung@samsung.com \
    --cc=keescook@chromium.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=ludovic.desroches@microchip.com \
    --cc=manuel.lauss@gmail.com \
    --cc=mirq-linux@rere.qmqm.pl \
    --cc=oakad@yahoo.com \
    --cc=romain.perier@gmail.com \
    --cc=ulf.hansson@linaro.org \
    --cc=yamada.masahiro@socionext.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.