Re: [patch] err.h: IS_ERR() can accept __user pointers

From: Christopher Li
Date: Wed May 08 2013 - 04:39:30 EST


On Wed, May 8, 2013 at 12:42 AM, Dan Carpenter <dan.carpenter@xxxxxxxxxx> wrote:
> 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.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> ---
> This change has no effect when using current Sparse releases.

Acked.

Chris
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/