Skip to contentSkip to conversation

e1000: fix sparse warning

PATCH In review Stephen Hemminger 3 participants 3 messages Feb 23, 2011 – Feb 24, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 e1000: fix sparse warning

Sparse complains because the e1000 driver is calling ioread on a pointer not tagged as __iomem.

drivers/net/e1000/e1000_osdep.h +2 -1
@@ -42,7 +42,8 @@
 #define GBE_CONFIG_RAM_BASE \
 	((unsigned int)(CONFIG_RAM_BASE + GBE_CONFIG_OFFSET))
 
-#define GBE_CONFIG_BASE_VIRT    phys_to_virt(GBE_CONFIG_RAM_BASE)
+#define GBE_CONFIG_BASE_VIRT \
+	((void __iomem *)phys_to_virt(GBE_CONFIG_RAM_BASE))
 
 #define GBE_CONFIG_FLASH_WRITE(base, offset, count, data) \
 	(iowrite16_rep(base + offset, data, count))