c->ptr was already copied to Kernelspace. So, this sparse warning
is bogus:

>> drivers/media/v4l2-core/v4l2-ctrls.c:1685:15: sparse: incorrect type in 
>> assignment (different address spaces)
   drivers/media/v4l2-core/v4l2-ctrls.c:1685:15:    expected void *[assigned] p
   drivers/media/v4l2-core/v4l2-ctrls.c:1685:15:    got void [noderef] 
<asn:1>*ptr

Reported-by: kbuild test robot <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>

diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c 
b/drivers/media/v4l2-core/v4l2-ctrls.c
index 35d1f3d5045b..ed10e4a9318c 100644
--- a/drivers/media/v4l2-core/v4l2-ctrls.c
+++ b/drivers/media/v4l2-core/v4l2-ctrls.c
@@ -1682,7 +1682,7 @@ static int validate_new(const struct v4l2_ctrl *ctrl,
                        break;
                }
        }
-       ptr.p = c->ptr;
+       ptr.p = (__force void *)c->ptr;
        for (idx = 0; !err && idx < c->size / ctrl->elem_size; idx++)
                err = ctrl->type_ops->validate(ctrl, idx, ptr);
        return err;
-- 
1.9.3

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to