Skip to content

Commit

Permalink
parisc: Avoid compiler warnings with access_ok()
Browse files Browse the repository at this point in the history
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 <deller@gmx.de>
Fixes: 09b871f ("parisc: Define access_ok() as macro")
  • Loading branch information
Helge Deller committed Mar 15, 2017
1 parent 63d32d1 commit 186ecf1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/parisc/include/asm/uaccess.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
* that put_user is the same as __put_user, etc.
*/

#define access_ok(type, uaddr, size) (1)
#define access_ok(type, uaddr, size) \
( (uaddr) == (uaddr) )

#define put_user __put_user
#define get_user __get_user
Expand Down

0 comments on commit 186ecf1

Please sign in to comment.