mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [patch 1/2] gpio-pch: add an __iomem anotation
@ 2011-10-18  6:26 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2011-10-18  6:26 UTC (permalink / raw)
  To: Grant Likely; +Cc: linux-kernel, kernel-janitors

Adding an __iomem anotation here silences some Sparse warnings.

drivers/gpio/gpio-pch.c:246:24: warning: incorrect type in assignment (different address spaces)
drivers/gpio/gpio-pch.c:246:24:    expected unsigned int [usertype] *im_reg
drivers/gpio/gpio-pch.c:246:24:    got unsigned int [noderef] <asn:2>*<noident>
drivers/gpio/gpio-pch.c:249:24: warning: incorrect type in assignment (different address spaces)
drivers/gpio/gpio-pch.c:249:24:    expected unsigned int [usertype] *im_reg
drivers/gpio/gpio-pch.c:249:24:    got unsigned int [noderef] <asn:2>*<noident>
drivers/gpio/gpio-pch.c:282:23: warning: incorrect type in argument 1 (different address spaces)
drivers/gpio/gpio-pch.c:282:23:    expected void [noderef] <asn:2>*<noident>
drivers/gpio/gpio-pch.c:282:23:    got unsigned int [usertype] *im_reg
drivers/gpio/gpio-pch.c:283:47: warning: incorrect type in argument 2 (different address spaces)
drivers/gpio/gpio-pch.c:283:47:    expected void [noderef] <asn:2>*<noident>
drivers/gpio/gpio-pch.c:283:47:    got unsigned int [usertype] *im_reg

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/gpio/gpio-pch.c b/drivers/gpio/gpio-pch.c
index 596e454..4068084 100644
--- a/drivers/gpio/gpio-pch.c
+++ b/drivers/gpio/gpio-pch.c
@@ -231,7 +231,7 @@ static void pch_gpio_setup(struct pch_gpio *chip)
 static int pch_irq_type(struct irq_data *d, unsigned int type)
 {
 	u32 im;
-	u32 *im_reg;
+	u32 __iomem *im_reg;
 	u32 ien;
 	u32 im_pos;
 	int ch;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-10-18  6:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-18  6:26 [patch 1/2] gpio-pch: add an __iomem anotation Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®