diff options
Diffstat (limited to 'include/asm-sparc')
-rw-r--r-- | include/asm-sparc/uaccess.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/asm-sparc/uaccess.h b/include/asm-sparc/uaccess.h index f461144067ee..0a780e84a12b 100644 --- a/include/asm-sparc/uaccess.h +++ b/include/asm-sparc/uaccess.h | |||
@@ -41,10 +41,11 @@ | |||
41 | * No one can read/write anything from userland in the kernel space by setting | 41 | * No one can read/write anything from userland in the kernel space by setting |
42 | * large size and address near to PAGE_OFFSET - a fault will break his intentions. | 42 | * large size and address near to PAGE_OFFSET - a fault will break his intentions. |
43 | */ | 43 | */ |
44 | #define __user_ok(addr,size) ((addr) < STACK_TOP) | 44 | #define __user_ok(addr, size) ({ (void)(size); (addr) < STACK_TOP; }) |
45 | #define __kernel_ok (segment_eq(get_fs(), KERNEL_DS)) | 45 | #define __kernel_ok (segment_eq(get_fs(), KERNEL_DS)) |
46 | #define __access_ok(addr,size) (__user_ok((addr) & get_fs().seg,(size))) | 46 | #define __access_ok(addr,size) (__user_ok((addr) & get_fs().seg,(size))) |
47 | #define access_ok(type,addr,size) __access_ok((unsigned long)(addr),(size)) | 47 | #define access_ok(type, addr, size) \ |
48 | ({ (void)(type); __access_ok((unsigned long)(addr), size); }) | ||
48 | 49 | ||
49 | /* this function will go away soon - use access_ok() instead */ | 50 | /* this function will go away soon - use access_ok() instead */ |
50 | static inline int __deprecated verify_area(int type, const void __user * addr, unsigned long size) | 51 | static inline int __deprecated verify_area(int type, const void __user * addr, unsigned long size) |