Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

m68knommu: __force type casts for raw IO access

Bring the m68knommu raw IO functions into line with the m68k raw IO
access functions and __force casting of the address component. This
is primarily to fix sparse warnings on use of these raw macros.

Reported-by: kernel test robot <lkp@intel.com>
CC: Marc Kleine-Budde <mkl@pengutronix.de>
Reviewed-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Signed-off-by: Greg Ungerer <gerg@linux-m68k.org>

+6 -6
+6 -6
arch/m68k/include/asm/io_no.h
··· 14 14 * that behavior here first before we include asm-generic/io.h. 15 15 */ 16 16 #define __raw_readb(addr) \ 17 - ({ unsigned char __v = (*(volatile unsigned char *) (addr)); __v; }) 17 + ({ u8 __v = (*(__force volatile u8 *) (addr)); __v; }) 18 18 #define __raw_readw(addr) \ 19 - ({ unsigned short __v = (*(volatile unsigned short *) (addr)); __v; }) 19 + ({ u16 __v = (*(__force volatile u16 *) (addr)); __v; }) 20 20 #define __raw_readl(addr) \ 21 - ({ unsigned int __v = (*(volatile unsigned int *) (addr)); __v; }) 21 + ({ u32 __v = (*(__force volatile u32 *) (addr)); __v; }) 22 22 23 - #define __raw_writeb(b, addr) (void)((*(volatile unsigned char *) (addr)) = (b)) 24 - #define __raw_writew(b, addr) (void)((*(volatile unsigned short *) (addr)) = (b)) 25 - #define __raw_writel(b, addr) (void)((*(volatile unsigned int *) (addr)) = (b)) 23 + #define __raw_writeb(b, addr) (void)((*(__force volatile u8 *) (addr)) = (b)) 24 + #define __raw_writew(b, addr) (void)((*(__force volatile u16 *) (addr)) = (b)) 25 + #define __raw_writel(b, addr) (void)((*(__force volatile u32 *) (addr)) = (b)) 26 26 27 27 #if defined(CONFIG_COLDFIRE) 28 28 /*