Skip to content

Commit 4caf4eb

Browse files
committed
Fix access_ok() fallout for sparc32 and powerpc
These two architectures actually had an intentional use of the 'type' argument to access_ok() just to avoid warnings. I had actually noticed the powerpc one, but forgot to then fix it up. And I missed the sparc32 case entirely. This is hopefully all of it. Reported-by: Mathieu Malaterre <[email protected]> Reported-by: Guenter Roeck <[email protected]> Fixes: 96d4f26 ("Remove 'type' argument from access_ok() function") Signed-off-by: Linus Torvalds <[email protected]>
1 parent 96d4f26 commit 4caf4eb

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

arch/powerpc/include/asm/uaccess.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ static inline int __access_ok(unsigned long addr, unsigned long size,
6363
#endif
6464

6565
#define access_ok(addr, size) \
66-
(__chk_user_ptr(addr), (void)(type), \
66+
(__chk_user_ptr(addr), \
6767
__access_ok((__force unsigned long)(addr), (size), get_fs()))
6868

6969
/*

arch/sparc/include/asm/uaccess_32.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@
3939
#define __user_ok(addr, size) ({ (void)(size); (addr) < STACK_TOP; })
4040
#define __kernel_ok (uaccess_kernel())
4141
#define __access_ok(addr, size) (__user_ok((addr) & get_fs().seg, (size)))
42-
#define access_ok(addr, size) \
43-
({ (void)(type); __access_ok((unsigned long)(addr), size); })
42+
#define access_ok(addr, size) __access_ok((unsigned long)(addr), size)
4443

4544
/*
4645
* The exception table consists of pairs of addresses: the first is the

0 commit comments

Comments
 (0)