[S390] uaccess: turn __access_ok() into a define
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Thu, 26 May 2011 07:48:25 +0000 (09:48 +0200)
committerHeiko Carstens <heiko.carstens@de.ibm.com>
Thu, 26 May 2011 07:48:25 +0000 (09:48 +0200)
Turn __access_ok() into a define and add a __chk_user_ptr() call
instead.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/include/asm/uaccess.h

index 2d9ea11f919ad2a1565091d3b861da2d2da09de5..2b23885e81e9a40019cc0d0e03748f3d4bbf670e 100644 (file)
 
 #define segment_eq(a,b) ((a).ar4 == (b).ar4)
 
+#define __access_ok(addr, size)        \
+({                             \
+       __chk_user_ptr(addr);   \
+       1;                      \
+})
 
-static inline int __access_ok(const void __user *addr, unsigned long size)
-{
-       return 1;
-}
-#define access_ok(type,addr,size) __access_ok(addr,size)
+#define access_ok(type, addr, size) __access_ok(addr, size)
 
 /*
  * The exception table consists of pairs of addresses: the first is the