linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mmc: dw_mmc: make irq flags 'unsigned long'
@ 2017-11-02 11:16 Arnd Bergmann
  2017-11-02 14:15 ` Ulf Hansson
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2017-11-02 11:16 UTC (permalink / raw)
  To: Jaehoon Chung, Ulf Hansson
  Cc: Arnd Bergmann, Shawn Lin, Douglas Anderson, Addy Ke, linux-mmc,
	linux-kernel

The newly added spin_lock_irqsave() passes an argument of the
wrong type, leading to a warning about non-portable code:

drivers/mmc/host/dw_mmc.c: In function 'dw_mci_set_drto':
include/linux/typecheck.h:11:18: error: comparison of distinct pointer types lacks a cast [-Werror]
  (void)(&__dummy == &__dummy2); \
drivers/mmc/host/dw_mmc.c:1953:2: note: in expansion of macro 'spin_lock_irqsave'
  spin_lock_irqsave(&host->irq_lock, irqflags);

This changes the type to 'unsigned long' as it should be.

Fixes: 80a2a5a7745b ("mmc: dw_mmc: Cleanup the DTO timer like the CTO one")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/mmc/host/dw_mmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 31f5744a50e0..37b55b095daf 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -1938,7 +1938,7 @@ static void dw_mci_set_drto(struct dw_mci *host)
 	unsigned int drto_clks;
 	unsigned int drto_div;
 	unsigned int drto_ms;
-	unsigned int irqflags;
+	unsigned long irqflags;
 
 	drto_clks = mci_readl(host, TMOUT) >> 8;
 	drto_div = (mci_readl(host, CLKDIV) & 0xff) * 2;
-- 
2.9.0

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

* Re: [PATCH] mmc: dw_mmc: make irq flags 'unsigned long'
  2017-11-02 11:16 [PATCH] mmc: dw_mmc: make irq flags 'unsigned long' Arnd Bergmann
@ 2017-11-02 14:15 ` Ulf Hansson
  0 siblings, 0 replies; 2+ messages in thread
From: Ulf Hansson @ 2017-11-02 14:15 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Jaehoon Chung, Shawn Lin, Douglas Anderson, Addy Ke, linux-mmc,
	linux-kernel

On 2 November 2017 at 12:16, Arnd Bergmann <arnd@arndb.de> wrote:
> The newly added spin_lock_irqsave() passes an argument of the
> wrong type, leading to a warning about non-portable code:
>
> drivers/mmc/host/dw_mmc.c: In function 'dw_mci_set_drto':
> include/linux/typecheck.h:11:18: error: comparison of distinct pointer types lacks a cast [-Werror]
>   (void)(&__dummy == &__dummy2); \
> drivers/mmc/host/dw_mmc.c:1953:2: note: in expansion of macro 'spin_lock_irqsave'
>   spin_lock_irqsave(&host->irq_lock, irqflags);
>
> This changes the type to 'unsigned long' as it should be.
>
> Fixes: 80a2a5a7745b ("mmc: dw_mmc: Cleanup the DTO timer like the CTO one")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Thanks, however this has already been taken care of. It was a silly
mistake made by me when I amended an original commit.

Kind regards
Uffe

> ---
>  drivers/mmc/host/dw_mmc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
> index 31f5744a50e0..37b55b095daf 100644
> --- a/drivers/mmc/host/dw_mmc.c
> +++ b/drivers/mmc/host/dw_mmc.c
> @@ -1938,7 +1938,7 @@ static void dw_mci_set_drto(struct dw_mci *host)
>         unsigned int drto_clks;
>         unsigned int drto_div;
>         unsigned int drto_ms;
> -       unsigned int irqflags;
> +       unsigned long irqflags;
>
>         drto_clks = mci_readl(host, TMOUT) >> 8;
>         drto_div = (mci_readl(host, CLKDIV) & 0xff) * 2;
> --
> 2.9.0
>

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

end of thread, other threads:[~2017-11-02 14:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-02 11:16 [PATCH] mmc: dw_mmc: make irq flags 'unsigned long' Arnd Bergmann
2017-11-02 14:15 ` Ulf Hansson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).