s390/uaccess: fix access_ok compile warnings
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Tue, 29 May 2012 05:33:59 +0000 (07:33 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Wed, 30 May 2012 08:01:11 +0000 (10:01 +0200)
commit491af9903b858ee7c36735dc31708fe4074ce56f
tree3617b5b496f610bffe9142ba07f6395bfe513497
parent2e30db9522837e2a5d30ce1e66afb0a7ee0ff350
s390/uaccess: fix access_ok compile warnings

On s390 access_ok is a macro which discards all parameters and always
returns 1. This can result in compile warnings which warn about unused
variables like this:

fs/read_write.c: In function 'rw_copy_check_uvector':
fs/read_write.c:684:16: warning: unused variable 'buf' [-Wunused-variable]

Fix this by adding a __range_ok() function which consumes all parameters
but still always returns 1.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/include/asm/uaccess.h