summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorWilliam Lee Irwin III <wli@holomorphy.com>2005-06-08 15:48:52 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-08 16:21:13 -0700
commitf8acd944ea511af02485b1709c07ac7aac12aa48 (patch)
tree1bd9bf244b4deec6249fda8de70e3d07e85fc546 /include
parentbeb9e1c3f32a0f878765c7c1142f91083739c5bd (diff)
downloadlinux-3.10-f8acd944ea511af02485b1709c07ac7aac12aa48.tar.gz
linux-3.10-f8acd944ea511af02485b1709c07ac7aac12aa48.tar.bz2
linux-3.10-f8acd944ea511af02485b1709c07ac7aac12aa48.zip
[PATCH] sparc32: silence access_ok() warnings
The fact that access_ok() doesn't use some of its arguments trips some unused variable warnings. This patch silences them permanently. Signed-off-by: William Irwin <wli@holomorphy.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
-rw-r--r--include/asm-sparc/uaccess.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/asm-sparc/uaccess.h b/include/asm-sparc/uaccess.h
index f461144067e..0a780e84a12 100644
--- a/include/asm-sparc/uaccess.h
+++ b/include/asm-sparc/uaccess.h
@@ -41,10 +41,11 @@
* No one can read/write anything from userland in the kernel space by setting
* large size and address near to PAGE_OFFSET - a fault will break his intentions.
*/
-#define __user_ok(addr,size) ((addr) < STACK_TOP)
+#define __user_ok(addr, size) ({ (void)(size); (addr) < STACK_TOP; })
#define __kernel_ok (segment_eq(get_fs(), KERNEL_DS))
#define __access_ok(addr,size) (__user_ok((addr) & get_fs().seg,(size)))
-#define access_ok(type,addr,size) __access_ok((unsigned long)(addr),(size))
+#define access_ok(type, addr, size) \
+ ({ (void)(type); __access_ok((unsigned long)(addr), size); })
/* this function will go away soon - use access_ok() instead */
static inline int __deprecated verify_area(int type, const void __user * addr, unsigned long size)