From 272c118888c977e0a2f850d6463adc3cfa7002be Mon Sep 17 00:00:00 2001 From: Stephen Rothwell Date: Sun, 23 Mar 2003 16:20:13 -0800 Subject: [PATCH] [PATCH] another fix for compat_ptr This is the other part of the missing bits of the compat_ptr patch pointed out to me by Andrew Morton and Dave Miller. This is just the architectures I have permission to send you. Dave has sent you his own already. --- include/asm-parisc/compat.h | 2 +- include/asm-ppc64/compat.h | 2 +- include/asm-s390x/compat.h | 2 +- include/asm-x86_64/compat.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/asm-parisc/compat.h b/include/asm-parisc/compat.h index 8861e442ff31a..86cb0684e4a09 100644 --- a/include/asm-parisc/compat.h +++ b/include/asm-parisc/compat.h @@ -114,7 +114,7 @@ typedef u32 compat_uptr_t; static inline void *compat_ptr(compat_uptr_t uptr) { - return (void *)uptr; + return (void *)(unsigned long)uptr; } #endif /* _ASM_PARISC_COMPAT_H */ diff --git a/include/asm-ppc64/compat.h b/include/asm-ppc64/compat.h index 0707b44ce9919..2929e0ca4e22b 100644 --- a/include/asm-ppc64/compat.h +++ b/include/asm-ppc64/compat.h @@ -108,7 +108,7 @@ typedef u32 compat_uptr_t; static inline void *compat_ptr(compat_uptr_t uptr) { - return (void *)uptr; + return (void *)(unsigned long)uptr; } #endif /* _ASM_PPC64_COMPAT_H */ diff --git a/include/asm-s390x/compat.h b/include/asm-s390x/compat.h index 9006690e257dc..b86ee23ac4955 100644 --- a/include/asm-s390x/compat.h +++ b/include/asm-s390x/compat.h @@ -111,7 +111,7 @@ typedef u32 compat_uptr_t; static inline void *compat_ptr(compat_uptr_t uptr) { - return (void *)(uptr & 0x7fffffffUL); + return (void *)(unsigned long)(uptr & 0x7fffffffUL); } #endif /* _ASM_S390X_COMPAT_H */ diff --git a/include/asm-x86_64/compat.h b/include/asm-x86_64/compat.h index 610b8824a5343..b6e5eac814022 100644 --- a/include/asm-x86_64/compat.h +++ b/include/asm-x86_64/compat.h @@ -117,7 +117,7 @@ typedef u32 compat_uptr_t; static inline void *compat_ptr(compat_uptr_t uptr) { - return (void *)uptr; + return (void *)(unsigned long)uptr; } #endif /* _ASM_X86_64_COMPAT_H */ -- 2.53.0