]> git.karo-electronics.de Git - karo-tx-linux.git/commit
err.h: IS_ERR() can accept __user pointers
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 9 May 2013 23:57:20 +0000 (09:57 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 21 May 2013 04:17:43 +0000 (14:17 +1000)
commite11e2ca61a0e9f2757d55eb12e019394adcb86cb
tree0d74971b296a7e3befba1075b1d3e5306a3a1cd0
parent442b6e3a980e24601cb930f42e029eeec6dec3a9
err.h: IS_ERR() can accept __user pointers

Sparse generates a false positive when you pass a __user or __iomem
pointer to the IS_ERR() functions.

drivers/rtc/rtc-ds1286.c:344:36: sparse: incorrect type in argument 1 (different address spaces)
drivers/rtc/rtc-ds1286.c:344:36:    expected void const *ptr
drivers/rtc/rtc-ds1286.c:344:36:    got unsigned int [noderef] [usertype] <asn:2>*rtcregs

We can silence these by adding a __force here and upgrading to the
latest git release of Sparse.

This change has no effect when using current Sparse releases.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Christopher Li <sparse@chrisli.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/err.h