ARM: warnings in arch/arm/include/asm/uaccess.h
authorArnd Bergmann <arnd@arndb.de>
Mon, 30 Apr 2012 13:18:46 +0000 (13:18 +0000)
committerArnd Bergmann <arnd@arndb.de>
Tue, 9 Oct 2012 18:29:07 +0000 (20:29 +0200)
commit8e7fc18b5eacc37b6e6fcf486ec4eafbfef91738
tree2daa83545c5c85b5ceb6712f1d189827ce94d0b4
parentf6d5d8a5ed60c726354605877e8f8214fb11cc02
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>
arch/arm/include/asm/uaccess.h