[PATCH 1/2] can: pch_can: fix sparse warning

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Marc Kleine-Budde
Date: Wednesday, October 27, 2010 - 1:38 am

This patch fixes the following sparse warning:

drivers/net/can/pch_can.c:231:26: warning: incorrect type in argument 1 (different address spaces)
drivers/net/can/pch_can.c:231:26:    expected unsigned int [usertype] *addr
drivers/net/can/pch_can.c:231:26:    got unsigned int [noderef] <asn:2>*<noident>

Let pch_can_bit_{set,clear} first parameter be a void __iomem pointer.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Cc: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com>
---
 drivers/net/can/pch_can.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/can/pch_can.c b/drivers/net/can/pch_can.c
index 55ec324..c63209f 100644
--- a/drivers/net/can/pch_can.c
+++ b/drivers/net/can/pch_can.c
@@ -213,12 +213,12 @@ static DEFINE_PCI_DEVICE_TABLE(pch_pci_tbl) = {
 };
 MODULE_DEVICE_TABLE(pci, pch_pci_tbl);
 
-static inline void pch_can_bit_set(u32 *addr, u32 mask)
+static inline void pch_can_bit_set(void __iomem *addr, u32 mask)
 {
 	iowrite32(ioread32(addr) | mask, addr);
 }
 
-static inline void pch_can_bit_clear(u32 *addr, u32 mask)
+static inline void pch_can_bit_clear(void __iomem *addr, u32 mask)
 {
 	iowrite32(ioread32(addr) & ~mask, addr);
 }
-- 
1.7.2.3

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0/2] can: pch_can: fix sparse warnings and section ..., Marc Kleine-Budde, (Wed Oct 27, 1:38 am)
[PATCH 1/2] can: pch_can: fix sparse warning, Marc Kleine-Budde, (Wed Oct 27, 1:38 am)
[PATCH 2/2] can: pch_can: fix section mismatch warning by ..., Marc Kleine-Budde, (Wed Oct 27, 1:38 am)
Re: [PATCH 1/2] can: pch_can: fix sparse warning, David Miller, (Sat Oct 30, 4:28 pm)