linux-mips
[Top] [All Lists]

[PATCH] Workaround for a sparse warning in include/asm-mips/mach-tx4927/

To: linux-mips@linux-mips.org
Subject: [PATCH] Workaround for a sparse warning in include/asm-mips/mach-tx4927/ioremap.h
From: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Date: Sat, 14 Jul 2007 00:06:44 +0900 (JST)
Cc: ralf@linux-mips.org
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
include2/asm/mach-tx49xx/ioremap.h:39:52: warning: cast truncates bits from 
constant value (fff000000 becomes ff000000)

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
---
diff --git a/include/asm-mips/mach-tx49xx/ioremap.h 
b/include/asm-mips/mach-tx49xx/ioremap.h
index 88cf546..1e7beae 100644
--- a/include/asm-mips/mach-tx49xx/ioremap.h
+++ b/include/asm-mips/mach-tx49xx/ioremap.h
@@ -36,7 +36,8 @@ static inline void __iomem *plat_ioremap(phys_t offset, 
unsigned long size,
 
 static inline int plat_iounmap(const volatile void __iomem *addr)
 {
-       return (unsigned long)addr >= (unsigned long)(int)TXX9_DIRECTMAP_BASE;
+       return (unsigned long)addr >=
+               (unsigned long)(int)(TXX9_DIRECTMAP_BASE & 0xffffffff);
 }
 
 #endif /* __ASM_MACH_TX49XX_IOREMAP_H */

<Prev in Thread] Current Thread [Next in Thread>
  • [PATCH] Workaround for a sparse warning in include/asm-mips/mach-tx4927/ioremap.h, Atsushi Nemoto <=