media: v4l2-ctrls: fix sparse warning 90/175690/1
authorHans Verkuil <hans.verkuil@cisco.com>
Wed, 28 Mar 2018 18:12:34 +0000 (15:12 -0300)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Wed, 11 Apr 2018 11:59:18 +0000 (20:59 +0900)
commit5a2facd85f3910c8485bb1049d8e69188706bb51
tree2e5f2a76430695a7dafdefbfb0eb28be69acbe38
parent333c5963b886d2f8abd4cea31c97d287717ec9f3
media: v4l2-ctrls: fix sparse warning

The warning is simple:

drivers/media/v4l2-core/v4l2-ctrls.c:1685:15: warning: incorrect type in assignment (different address spaces)

but the fix isn't.

The core problem was that the conversion from user to kernelspace was
done at too low a level and that needed to be moved up. That made it possible
to drop pointers to v4l2_ext_control from set_ctrl and validate_new and
clean up this sparse warning because those functions now always operate
on kernelspace pointers.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[sw0312.kim: cherry-pick from linux-3.18.y]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I6fb703a407c7e41e640fe018005db461ce01f57a
drivers/media/v4l2-core/v4l2-ctrls.c