lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Thu,  2 Nov 2017 12:16:46 +0100
From:   Arnd Bergmann <arnd@...db.de>
To:     Jaehoon Chung <jh80.chung@...sung.com>,
        Ulf Hansson <ulf.hansson@...aro.org>
Cc:     Arnd Bergmann <arnd@...db.de>,
        Shawn Lin <shawn.lin@...k-chips.com>,
        Douglas Anderson <dianders@...omium.org>,
        Addy Ke <addy.ke@...k-chips.com>, linux-mmc@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: [PATCH] mmc: dw_mmc: make irq flags 'unsigned long'

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@...db.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

Powered by blists - more mailing lists