All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] use setup_timer() helper function.
@ 2017-09-22 12:07 Allen Pais
  2017-09-22 12:07 ` [PATCH 1/4] mmc-host: wbsd: use setup_timer() helper Allen Pais
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Allen Pais @ 2017-09-22 12:07 UTC (permalink / raw)
  To: ulf.hansson; +Cc: brucechang, tony.olech, pierre, linux-mmc, Allen Pais

This series uses setup_timer() helper function. The series
addresses the files under drivers/mmc/host/*.


Allen Pais (4):
  mmc-host: wbsd: use setup_timer() helper.
  mmc-host: via: use setup_timer() helper.
  mmc-host: vub300: use setup_timer() helper.
  mmc-host: mxcmmc: use setup_timer() helper.

 drivers/mmc/host/mxcmmc.c    |  4 +---
 drivers/mmc/host/via-sdmmc.c |  4 +---
 drivers/mmc/host/vub300.c    | 10 ++++------
 drivers/mmc/host/wbsd.c      |  5 ++---
 4 files changed, 8 insertions(+), 15 deletions(-)

-- 
2.7.4


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/4] mmc-host: wbsd: use setup_timer() helper.
  2017-09-22 12:07 [PATCH 0/4] use setup_timer() helper function Allen Pais
@ 2017-09-22 12:07 ` Allen Pais
  2017-09-22 12:07 ` [PATCH 2/4] mmc-host: via: " Allen Pais
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Allen Pais @ 2017-09-22 12:07 UTC (permalink / raw)
  To: ulf.hansson; +Cc: brucechang, tony.olech, pierre, linux-mmc, Allen Pais

   Use setup_timer function instead of initializing timer with the
   function and data fields.

Signed-off-by: Allen Pais <allen.lkml@gmail.com>
---
 drivers/mmc/host/wbsd.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/mmc/host/wbsd.c b/drivers/mmc/host/wbsd.c
index 546aaf8..499852d 100644
--- a/drivers/mmc/host/wbsd.c
+++ b/drivers/mmc/host/wbsd.c
@@ -1224,9 +1224,8 @@ static int wbsd_alloc_mmc(struct device *dev)
 	/*
 	 * Set up timers
 	 */
-	init_timer(&host->ignore_timer);
-	host->ignore_timer.data = (unsigned long)host;
-	host->ignore_timer.function = wbsd_reset_ignore;
+	setup_timer(&host->ignore_timer, wbsd_reset_ignore,
+		    (unsigned long)host);
 
 	/*
 	 * Maximum number of segments. Worst case is one sector per segment
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/4] mmc-host: via: use setup_timer() helper.
  2017-09-22 12:07 [PATCH 0/4] use setup_timer() helper function Allen Pais
  2017-09-22 12:07 ` [PATCH 1/4] mmc-host: wbsd: use setup_timer() helper Allen Pais
@ 2017-09-22 12:07 ` Allen Pais
  2017-09-22 12:07 ` [PATCH 3/4] mmc-host: vub300: " Allen Pais
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Allen Pais @ 2017-09-22 12:07 UTC (permalink / raw)
  To: ulf.hansson; +Cc: brucechang, tony.olech, pierre, linux-mmc, Allen Pais

   Use setup_timer function instead of initializing timer with the
   function and data fields.

Signed-off-by: Allen Pais <allen.lkml@gmail.com>
---
 drivers/mmc/host/via-sdmmc.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/mmc/host/via-sdmmc.c b/drivers/mmc/host/via-sdmmc.c
index a838bf5..a8c97b6 100644
--- a/drivers/mmc/host/via-sdmmc.c
+++ b/drivers/mmc/host/via-sdmmc.c
@@ -1036,9 +1036,7 @@ static void via_init_mmc_host(struct via_crdr_mmc_host *host)
 	u32 lenreg;
 	u32 status;
 
-	init_timer(&host->timer);
-	host->timer.data = (unsigned long)host;
-	host->timer.function = via_sdc_timeout;
+	setup_timer(&host->timer, via_sdc_timeout, (unsigned long)host);
 
 	spin_lock_init(&host->lock);
 
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 3/4] mmc-host: vub300: use setup_timer() helper.
  2017-09-22 12:07 [PATCH 0/4] use setup_timer() helper function Allen Pais
  2017-09-22 12:07 ` [PATCH 1/4] mmc-host: wbsd: use setup_timer() helper Allen Pais
  2017-09-22 12:07 ` [PATCH 2/4] mmc-host: via: " Allen Pais
@ 2017-09-22 12:07 ` Allen Pais
  2017-09-22 12:07 ` [PATCH 4/4] mmc-host: mxcmmc: " Allen Pais
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Allen Pais @ 2017-09-22 12:07 UTC (permalink / raw)
  To: ulf.hansson; +Cc: brucechang, tony.olech, pierre, linux-mmc, Allen Pais

   Use setup_timer function instead of initializing timer with the
   function and data fields.

Signed-off-by: Allen Pais <allen.lkml@gmail.com>
---
 drivers/mmc/host/vub300.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/mmc/host/vub300.c b/drivers/mmc/host/vub300.c
index 8f569d2..c1a1698 100644
--- a/drivers/mmc/host/vub300.c
+++ b/drivers/mmc/host/vub300.c
@@ -2323,13 +2323,11 @@ static int vub300_probe(struct usb_interface *interface,
 	INIT_WORK(&vub300->cmndwork, vub300_cmndwork_thread);
 	INIT_WORK(&vub300->deadwork, vub300_deadwork_thread);
 	kref_init(&vub300->kref);
-	init_timer(&vub300->sg_transfer_timer);
-	vub300->sg_transfer_timer.data = (unsigned long)vub300;
-	vub300->sg_transfer_timer.function = vub300_sg_timed_out;
+	setup_timer(&vub300->sg_transfer_timer, vub300_sg_timed_out,
+		    (unsigned long)vub300);
 	kref_get(&vub300->kref);
-	init_timer(&vub300->inactivity_timer);
-	vub300->inactivity_timer.data = (unsigned long)vub300;
-	vub300->inactivity_timer.function = vub300_inactivity_timer_expired;
+	setup_timer(&vub300->inactivity_timer,
+		    vub300_inactivity_timer_expired, (unsigned long)vub300);
 	vub300->inactivity_timer.expires = jiffies + HZ;
 	add_timer(&vub300->inactivity_timer);
 	if (vub300->card_present)
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 4/4] mmc-host: mxcmmc: use setup_timer() helper.
  2017-09-22 12:07 [PATCH 0/4] use setup_timer() helper function Allen Pais
                   ` (2 preceding siblings ...)
  2017-09-22 12:07 ` [PATCH 3/4] mmc-host: vub300: " Allen Pais
@ 2017-09-22 12:07 ` Allen Pais
  2017-09-22 13:34 ` [PATCH 0/4] use setup_timer() helper function Shawn Lin
  2017-09-26 22:24 ` Ulf Hansson
  5 siblings, 0 replies; 7+ messages in thread
From: Allen Pais @ 2017-09-22 12:07 UTC (permalink / raw)
  To: ulf.hansson; +Cc: brucechang, tony.olech, pierre, linux-mmc, Allen Pais

   Use setup_timer function instead of initializing timer with the
   function and data fields.

Signed-off-by: Allen Pais <allen.lkml@gmail.com>
---
 drivers/mmc/host/mxcmmc.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/mmc/host/mxcmmc.c b/drivers/mmc/host/mxcmmc.c
index 1d5418e..328484b 100644
--- a/drivers/mmc/host/mxcmmc.c
+++ b/drivers/mmc/host/mxcmmc.c
@@ -1165,9 +1165,7 @@ static int mxcmci_probe(struct platform_device *pdev)
 			goto out_free_dma;
 	}
 
-	init_timer(&host->watchdog);
-	host->watchdog.function = &mxcmci_watchdog;
-	host->watchdog.data = (unsigned long)mmc;
+	setup_timer(&host->watchdog, &mxcmci_watchdog, (unsigned long)mmc);
 
 	mmc_add_host(mmc);
 
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 0/4] use setup_timer() helper function.
  2017-09-22 12:07 [PATCH 0/4] use setup_timer() helper function Allen Pais
                   ` (3 preceding siblings ...)
  2017-09-22 12:07 ` [PATCH 4/4] mmc-host: mxcmmc: " Allen Pais
@ 2017-09-22 13:34 ` Shawn Lin
  2017-09-26 22:24 ` Ulf Hansson
  5 siblings, 0 replies; 7+ messages in thread
From: Shawn Lin @ 2017-09-22 13:34 UTC (permalink / raw)
  To: Allen Pais
  Cc: ulf.hansson, shawn.lin, brucechang, tony.olech, pierre, linux-mmc

On 2017/9/22 20:07, Allen Pais wrote:
> This series uses setup_timer() helper function. The series
> addresses the files under drivers/mmc/host/*.
>

Better to provide some solid info if that is done by some static tools
like coccinelle?

But looks like a nice cleanup,

Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com>


>
> Allen Pais (4):
>   mmc-host: wbsd: use setup_timer() helper.
>   mmc-host: via: use setup_timer() helper.
>   mmc-host: vub300: use setup_timer() helper.
>   mmc-host: mxcmmc: use setup_timer() helper.
>
>  drivers/mmc/host/mxcmmc.c    |  4 +---
>  drivers/mmc/host/via-sdmmc.c |  4 +---
>  drivers/mmc/host/vub300.c    | 10 ++++------
>  drivers/mmc/host/wbsd.c      |  5 ++---
>  4 files changed, 8 insertions(+), 15 deletions(-)
>


-- 
Best Regards
Shawn Lin


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 0/4] use setup_timer() helper function.
  2017-09-22 12:07 [PATCH 0/4] use setup_timer() helper function Allen Pais
                   ` (4 preceding siblings ...)
  2017-09-22 13:34 ` [PATCH 0/4] use setup_timer() helper function Shawn Lin
@ 2017-09-26 22:24 ` Ulf Hansson
  5 siblings, 0 replies; 7+ messages in thread
From: Ulf Hansson @ 2017-09-26 22:24 UTC (permalink / raw)
  To: Allen Pais; +Cc: brucechang, Tony Olech, Pierre Ossman, linux-mmc

On 22 September 2017 at 14:07, Allen Pais <allen.lkml@gmail.com> wrote:
> This series uses setup_timer() helper function. The series
> addresses the files under drivers/mmc/host/*.
>
>
> Allen Pais (4):
>   mmc-host: wbsd: use setup_timer() helper.
>   mmc-host: via: use setup_timer() helper.
>   mmc-host: vub300: use setup_timer() helper.
>   mmc-host: mxcmmc: use setup_timer() helper.
>
>  drivers/mmc/host/mxcmmc.c    |  4 +---
>  drivers/mmc/host/via-sdmmc.c |  4 +---
>  drivers/mmc/host/vub300.c    | 10 ++++------
>  drivers/mmc/host/wbsd.c      |  5 ++---
>  4 files changed, 8 insertions(+), 15 deletions(-)
>
> --
> 2.7.4
>

Thanks, applied for next!

Kind regards
Uffe

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-09-26 22:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-22 12:07 [PATCH 0/4] use setup_timer() helper function Allen Pais
2017-09-22 12:07 ` [PATCH 1/4] mmc-host: wbsd: use setup_timer() helper Allen Pais
2017-09-22 12:07 ` [PATCH 2/4] mmc-host: via: " Allen Pais
2017-09-22 12:07 ` [PATCH 3/4] mmc-host: vub300: " Allen Pais
2017-09-22 12:07 ` [PATCH 4/4] mmc-host: mxcmmc: " Allen Pais
2017-09-22 13:34 ` [PATCH 0/4] use setup_timer() helper function Shawn Lin
2017-09-26 22:24 ` Ulf Hansson

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.