path: root/arch/arm/include/asm/uaccess.h
diff options
authorArnd Bergmann <arnd@arndb.de>2012-04-30 13:18:46 +0000
committerArnd Bergmann <arnd@arndb.de>2012-10-09 20:29:07 +0200
commit8e7fc18b5eacc37b6e6fcf486ec4eafbfef91738 (patch)
tree2daa83545c5c85b5ceb6712f1d189827ce94d0b4 /arch/arm/include/asm/uaccess.h
parentf6d5d8a5ed60c726354605877e8f8214fb11cc02 (diff)
ARM: warnings in arch/arm/include/asm/uaccess.h
On NOMMU ARM, the __addr_ok() and __range_ok() macros do not evaluate their arguments, which may lead to harmless build warnings in some code where the variables are not used otherwise. Adding a cast to void gets rid of the warning and does not make any semantic changes. Without this patch, building at91x40_defconfig results in: fs/read_write.c: In function 'rw_copy_check_uvector': fs/read_write.c:684:9: warning: unused variable 'buf' [-Wunused-variable] Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Greg Ungerer <gerg@uclinux.org> Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/include/asm/uaccess.h')
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/include/asm/uaccess.h b/arch/arm/include/asm/uaccess.h
index 77bd79f2ffd..7e1f76027f6 100644
--- a/arch/arm/include/asm/uaccess.h
+++ b/arch/arm/include/asm/uaccess.h
@@ -200,8 +200,8 @@ extern int __put_user_8(void *, unsigned long long);
#define segment_eq(a,b) (1)
-#define __addr_ok(addr) (1)
-#define __range_ok(addr,size) (0)
+#define __addr_ok(addr) ((void)(addr),1)
+#define __range_ok(addr,size) ((void)(addr),0)
#define get_fs() (KERNEL_DS)
static inline void set_fs(mm_segment_t fs)