Linux MIPS Architecture development
 help / color / mirror / Atom feed
* [PATCH] Workaround for a sparse warning in include/asm-mips/io.h
@ 2007-07-11 14:12 Atsushi Nemoto
  2007-07-11 14:28 ` Maciej W. Rozycki
  2007-07-12 13:41 ` Ralf Baechle
  0 siblings, 2 replies; 7+ messages in thread
From: Atsushi Nemoto @ 2007-07-11 14:12 UTC (permalink / raw)
  To: linux-mips; +Cc: ralf

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>
---
diff --git a/include/asm-mips/io.h b/include/asm-mips/io.h
index 12bcc1f..7ba9289 100644
--- a/include/asm-mips/io.h
+++ b/include/asm-mips/io.h
@@ -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);

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-07-12 13:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-11 14:12 [PATCH] Workaround for a sparse warning in include/asm-mips/io.h Atsushi Nemoto
2007-07-11 14:28 ` Maciej W. Rozycki
2007-07-11 14:54   ` Atsushi Nemoto
2007-07-12 13:19     ` Ralf Baechle
2007-07-12 13:41       ` Ralf Baechle
2007-07-12 13:41     ` Ralf Baechle
2007-07-12 13:41 ` Ralf Baechle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox