Skip to content

Commit 186ecf1

Browse files
committed
parisc: Avoid compiler warnings with access_ok()
Commit 09b871f (parisc: Define access_ok() as macro) missed to mark uaddr as used, which then gives compiler warnings about unused variables. Fix it by comparing uaddr to uaddr which then gets optimized away by the compiler. Signed-off-by: Helge Deller <[email protected]> Fixes: 09b871f ("parisc: Define access_ok() as macro")
1 parent 63d32d1 commit 186ecf1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

arch/parisc/include/asm/uaccess.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@
3232
* that put_user is the same as __put_user, etc.
3333
*/
3434

35-
#define access_ok(type, uaddr, size) (1)
35+
#define access_ok(type, uaddr, size) \
36+
( (uaddr) == (uaddr) )
3637

3738
#define put_user __put_user
3839
#define get_user __get_user

0 commit comments

Comments
 (0)