From: Marc Kleine-Budde <mkl@pengutronix.de>
To: socketcan-core@lists.berlios.de
Cc: netdev@vger.kernel.org, Marc Kleine-Budde <mkl@pengutronix.de>,
Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com>
Subject: [PATCH 1/2] can: pch_can: fix sparse warning
Date: Wed, 27 Oct 2010 10:38:25 +0200 [thread overview]
Message-ID: <1288168706-870-2-git-send-email-mkl@pengutronix.de> (raw)
In-Reply-To: <1288168706-870-1-git-send-email-mkl@pengutronix.de>
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
next prev parent reply other threads:[~2010-10-27 8:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-27 8:38 [PATCH 0/2] can: pch_can: fix sparse warnings and section mismatch Marc Kleine-Budde
2010-10-27 8:38 ` Marc Kleine-Budde [this message]
[not found] ` <1288168706-870-2-git-send-email-mkl-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2010-10-30 23:28 ` [PATCH 1/2] can: pch_can: fix sparse warning David Miller
[not found] ` <1288168706-870-1-git-send-email-mkl-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2010-10-27 8:38 ` [PATCH 2/2] can: pch_can: fix section mismatch warning by using a whitelisted name Marc Kleine-Budde
2010-10-30 23:28 ` David Miller
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=1288168706-870-2-git-send-email-mkl@pengutronix.de \
--to=mkl@pengutronix.de \
--cc=netdev@vger.kernel.org \
--cc=socketcan-core@lists.berlios.de \
--cc=tomoya-linux@dsn.okisemi.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 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).