]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
[MIPS] Workaround for a sparse warning in include/asm-mips/io.h
authorAtsushi Nemoto <anemo@mba.ocn.ne.jp>
Wed, 11 Jul 2007 14:12:00 +0000 (23:12 +0900)
committerRalf Baechle <ralf@linux-mips.org>
Thu, 12 Jul 2007 16:41:10 +0000 (17:41 +0100)
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>
include/asm-mips/io.h

index 12bcc1f9fba97387102382cae58f676a728125d2..7ba92890ea13eeeef95f55d9bb0e9b9429ed593b 100644 (file)
@@ -212,7 +212,8 @@ static inline void __iomem * __ioremap_mode(phys_t offset, unsigned long size,
                 */
                if (__IS_LOW512(phys_addr) && __IS_LOW512(last_addr) &&
                    flags == _CACHE_UNCACHED)
-                       return (void __iomem *)CKSEG1ADDR(phys_addr);
+                       return (void __iomem *)
+                               (unsigned long)CKSEG1ADDR(phys_addr);
        }
 
        return __ioremap(offset, size, flags);