[PATCH] add __force tag to fb_readb, etc.

Atsushi Nemoto
2006-02-17T15:04:22Z

This patch fixes many sparse warnings on MIPS (and some other) platform.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>

diff --git a/include/linux/fb.h b/include/linux/fb.h
index 2cb19e6..61562d7 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -823,14 +823,14 @@ struct fb_info {

#else

-#define fb_readb(addr) (*(volatile u8 *) (addr))
-#define fb_readw(addr) (*(volatile u16 *) (addr))
-#define fb_readl(addr) (*(volatile u32 *) (addr))
-#define fb_readq(addr) (*(volatile u64 *) (addr))
-#define fb_writeb(b,addr) (*(volatile u8 *) (addr) = (b))
-#define fb_writew(b,addr) (*(volatile u16 *) (addr) = (b))
-#define fb_writel(b,addr) (*(volatile u32 *) (addr) = (b))
-#define fb_writeq(b,addr) (*(volatile u64 *) (addr) = (b))
+#define fb_readb(addr) (*(volatile u8 __force *) (addr))
+#define fb_readw(addr) (*(volatile u16 __force *) (addr))
+#define fb_readl(addr) (*(volatile u32 __force *) (addr))
+#define fb_readq(addr) (*(volatile u64 __force *) (addr))
+#define fb_writeb(b,addr) (*(volatile u8 __force *) (addr) = (b))
+#define fb_writew(b,addr) (*(volatile u16 __force *) (addr) = (b))
+#define fb_writel(b,addr) (*(volatile u32 __force *) (addr) = (b))
+#define fb_writeq(b,addr) (*(volatile u64 __force *) (addr) = (b))
#define fb_memset memset

#endif