summaryrefslogtreecommitdiff
path: root/arch/parisc
diff options
context:
space:
mode:
authorHelge Deller <deller@gmx.de>2017-03-15 21:48:42 +0100
committerHelge Deller <deller@gmx.de>2017-03-15 21:51:17 +0100
commit186ecf14e58befba434f0774eea89e35f64d3c6a (patch)
tree05bd7cbefb50716eaef9310cddf3df0a16c8e13b /arch/parisc
parent63d32d1e09cb2fc65b084b261976c06b40d19115 (diff)
parisc: Avoid compiler warnings with access_ok()
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")
Diffstat (limited to 'arch/parisc')
-rw-r--r--arch/parisc/include/asm/uaccess.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/parisc/include/asm/uaccess.h b/arch/parisc/include/asm/uaccess.h
index fb4382c28259..edfbf9d6a6dd 100644
--- a/arch/parisc/include/asm/uaccess.h
+++ b/arch/parisc/include/asm/uaccess.h
@@ -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