]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
parisc: Avoid compiler warnings with access_ok()
authorHelge Deller <deller@gmx.de>
Wed, 15 Mar 2017 20:48:42 +0000 (21:48 +0100)
committerHelge Deller <deller@gmx.de>
Wed, 15 Mar 2017 20:51:17 +0000 (21:51 +0100)
Commit 09b871ffd4d8 (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: 09b871ffd4d8 ("parisc: Define access_ok() as macro")
arch/parisc/include/asm/uaccess.h

index fb4382c28259b3ff2f873014fce7e42f1373dac8..edfbf9d6a6dd76adae077d49d76a236d299bceda 100644 (file)
@@ -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