]> 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, 23 May 2013 00:37:24 +0000 (10:37 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 27 May 2013 06:09:08 +0000 (16:09 +1000)
commitc8f438d805be885fb9048e01ba30adc9a80dbab2
tree5b245269951c8a8b2765f3189c971b0e1b2551b6
parentf3b5eae0dd4a8c5036db8ec979edd442d8298d67
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