[PATCH][COMPAT] another fix for compat_ptr

From: Stephen Rothwell (sfr@canb.auug.org.au)
Date: Mon Mar 24 2003 - 06:21:48 EST


Hi Linus,

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.

Please apply.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

diff -ruN 2.5.65-2003032421/include/asm-parisc/compat.h 2.5.65-2003032421-32bit.1/include/asm-parisc/compat.h --- 2.5.65-2003032421/include/asm-parisc/compat.h 2003-03-24 21:35:55.000000000 +1100 +++ 2.5.65-2003032421-32bit.1/include/asm-parisc/compat.h 2003-03-24 21:55:20.000000000 +1100 @@ -114,7 +114,7 @@ static inline void *compat_ptr(compat_uptr_t uptr) { - return (void *)uptr; + return (void *)(unsigned long)uptr; } #endif /* _ASM_PARISC_COMPAT_H */ diff -ruN 2.5.65-2003032421/include/asm-ppc64/compat.h 2.5.65-2003032421-32bit.1/include/asm-ppc64/compat.h --- 2.5.65-2003032421/include/asm-ppc64/compat.h 2003-03-24 21:35:55.000000000 +1100 +++ 2.5.65-2003032421-32bit.1/include/asm-ppc64/compat.h 2003-03-24 21:55:55.000000000 +1100 @@ -108,7 +108,7 @@ static inline void *compat_ptr(compat_uptr_t uptr) { - return (void *)uptr; + return (void *)(unsigned long)uptr; } #endif /* _ASM_PPC64_COMPAT_H */ diff -ruN 2.5.65-2003032421/include/asm-s390x/compat.h 2.5.65-2003032421-32bit.1/include/asm-s390x/compat.h --- 2.5.65-2003032421/include/asm-s390x/compat.h 2003-03-24 21:35:55.000000000 +1100 +++ 2.5.65-2003032421-32bit.1/include/asm-s390x/compat.h 2003-03-24 21:56:51.000000000 +1100 @@ -111,7 +111,7 @@ 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 -ruN 2.5.65-2003032421/include/asm-x86_64/compat.h 2.5.65-2003032421-32bit.1/include/asm-x86_64/compat.h --- 2.5.65-2003032421/include/asm-x86_64/compat.h 2003-03-24 21:35:55.000000000 +1100 +++ 2.5.65-2003032421-32bit.1/include/asm-x86_64/compat.h 2003-03-24 21:57:46.000000000 +1100 @@ -117,7 +117,7 @@ static inline void *compat_ptr(compat_uptr_t uptr) { - return (void *)uptr; + return (void *)(unsigned long)uptr; } #endif /* _ASM_X86_64_COMPAT_H */ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Mar 31 2003 - 22:00:15 EST