]> git.karo-electronics.de Git - karo-tx-linux.git/commit
err.h: IS_ERR() can accept __user pointers
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 7 Jun 2013 00:08:37 +0000 (10:08 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 7 Jun 2013 05:42:40 +0000 (15:42 +1000)
commit881f3cf30cef4081d577d35d85cab07b27507c09
treeb5b4bcf657327bdc9f1a990becb26cd218943d36
parent7bf12e10430358f324342cf4efdf5fbae36dadfe
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