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

[MIPS] Workaround for a sparse warning in include/asm-mips/io.h

CKSEG1ADDR() returns unsigned int value on 32bit kernel. Cast it to
unsigned long to get rid of this warning:

include2/asm/io.h:215:12: warning: cast adds address space to expression (<asn:2>)

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

authored by

Atsushi Nemoto and committed by
Ralf Baechle
c0cf5001 9815778a

+2 -1
+2 -1
include/asm-mips/io.h
··· 212 212 */ 213 213 if (__IS_LOW512(phys_addr) && __IS_LOW512(last_addr) && 214 214 flags == _CACHE_UNCACHED) 215 - return (void __iomem *)CKSEG1ADDR(phys_addr); 215 + return (void __iomem *) 216 + (unsigned long)CKSEG1ADDR(phys_addr); 216 217 } 217 218 218 219 return __ioremap(offset, size, flags);