diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-mips/compat.h | 3 | ||||
-rw-r--r-- | include/asm-mips/mach-tx49xx/ioremap.h | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/include/asm-mips/compat.h b/include/asm-mips/compat.h index 432653d7ae09..67c3f8ec0303 100644 --- a/include/asm-mips/compat.h +++ b/include/asm-mips/compat.h | |||
@@ -132,7 +132,8 @@ typedef u32 compat_uptr_t; | |||
132 | 132 | ||
133 | static inline void __user *compat_ptr(compat_uptr_t uptr) | 133 | static inline void __user *compat_ptr(compat_uptr_t uptr) |
134 | { | 134 | { |
135 | return (void __user *)(long)uptr; | 135 | /* cast to a __user pointer via "unsigned long" makes sparse happy */ |
136 | return (void __user *)(unsigned long)(long)uptr; | ||
136 | } | 137 | } |
137 | 138 | ||
138 | static inline compat_uptr_t ptr_to_compat(void __user *uptr) | 139 | static inline compat_uptr_t ptr_to_compat(void __user *uptr) |
diff --git a/include/asm-mips/mach-tx49xx/ioremap.h b/include/asm-mips/mach-tx49xx/ioremap.h index 88cf546719b8..1e7beae72229 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, | |||
36 | 36 | ||
37 | static inline int plat_iounmap(const volatile void __iomem *addr) | 37 | static inline int plat_iounmap(const volatile void __iomem *addr) |
38 | { | 38 | { |
39 | return (unsigned long)addr >= (unsigned long)(int)TXX9_DIRECTMAP_BASE; | 39 | return (unsigned long)addr >= |
40 | (unsigned long)(int)(TXX9_DIRECTMAP_BASE & 0xffffffff); | ||
40 | } | 41 | } |
41 | 42 | ||
42 | #endif /* __ASM_MACH_TX49XX_IOREMAP_H */ | 43 | #endif /* __ASM_MACH_TX49XX_IOREMAP_H */ |