Skip to content

Commit

Permalink
[PATCH] sparc32: silence access_ok() warnings
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
William Lee Irwin III authored and Linus Torvalds committed Jun 8, 2005
1 parent beb9e1c commit f8acd94
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions include/asm-sparc/uaccess.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f8acd94

Please sign in to comment.