Skip to content

Commit

Permalink
[MIPS] Workaround for a sparse warning in include/asm-mips/io.h
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Atsushi Nemoto authored and Ralf Baechle committed Jul 12, 2007
1 parent 9815778 commit c0cf500
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/asm-mips/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit c0cf500

Please sign in to comment.