media: v4l2-ctrls: fix sparse warning
authorHans Verkuil <hans.verkuil@cisco.com>
Wed, 28 Mar 2018 18:12:34 +0000 (15:12 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 8 Apr 2018 09:49:47 +0000 (11:49 +0200)
commit5f5fe19a886db65a5a9a8b4cc27473e0a5ce7916
treef991dbbc5f453cbf88172918132d1bdfdc00aded
parent5829f6608f339153d8975d7f69bdbf3ab49167ff
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>
drivers/media/v4l2-core/v4l2-ctrls.c