From bc1275218c999d14b876689454e06412d1740806 Mon Sep 17 00:00:00 2001 From: Arend van Spriel Date: Thu, 1 Sep 2011 11:17:11 +0200 Subject: [PATCH] staging: brcm80211: reduce sparse messages on brcmsmac sources Running sparse over the driver sources showed 1356 sparse messages and quite a number are due to missing __iomem attribute in some places. This patch reduces the number significantly. Reported-by: Aaro Koskinen Reviewed-by: Roland Vossen Reviewed-by: Pieter-Paul Giesberts Signed-off-by: Roland Vossen Signed-off-by: Greg Kroah-Hartman --- drivers/staging/brcm80211/brcmsmac/types.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/brcm80211/brcmsmac/types.h b/drivers/staging/brcm80211/brcmsmac/types.h index 6d17d7fa9b7b..cf65f6e7522f 100644 --- a/drivers/staging/brcm80211/brcmsmac/types.h +++ b/drivers/staging/brcm80211/brcmsmac/types.h @@ -328,13 +328,13 @@ do { \ __typeof(*(r)) __osl_v; \ switch (sizeof(*(r))) { \ case sizeof(u8): \ - __osl_v = readb((u8 *)(r)); \ + __osl_v = readb((u8 __iomem *)(r)); \ break; \ case sizeof(u16): \ - __osl_v = readw((u16 *)(r)); \ + __osl_v = readw((u16 __iomem *)(r)); \ break; \ case sizeof(u32): \ - __osl_v = readl((u32 *)(r)); \ + __osl_v = readl((u32 __iomem *)(r)); \ break; \ } \ __osl_v; \ @@ -343,13 +343,13 @@ do { \ #define W_REG(r, v) do { \ switch (sizeof(*(r))) { \ case sizeof(u8): \ - writeb((u8)(v), (u8 *)(r)); \ + writeb((u8)((v) & 0xFF), (u8 __iomem *)(r)); \ break; \ case sizeof(u16): \ - writew((u16)(v), (u16 *)(r)); \ + writew((u16)((v) & 0xFFFF), (u16 __iomem *)(r)); \ break; \ case sizeof(u32): \ - writel((u32)(v), (u32 *)(r)); \ + writel((u32)(v), (u32 __iomem *)(r)); \ break; \ } \ } while (0) -- 2.30.2