media: v4l2-ioctl: fix some "too small" warnings
authorMauro Carvalho Chehab <mchehab@s-opensource.com>
Thu, 22 Mar 2018 18:02:21 +0000 (14:02 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Fri, 23 Mar 2018 10:28:42 +0000 (06:28 -0400)
commit912d2f8228be077a1743adb797ada1dfcfe99c81
tree5e556862760e131d3c6c26eff0aa500ad55ca64f
parent1a086879fdd37d9e4c3dd4e49fac62f7e418e17e
media: v4l2-ioctl: fix some "too small" warnings

While the code there is right, it produces three false positives:
drivers/media/v4l2-core/v4l2-ioctl.c:2868 video_usercopy() error: copy_from_user() 'parg' too small (128 vs 16383)
drivers/media/v4l2-core/v4l2-ioctl.c:2868 video_usercopy() error: copy_from_user() 'parg' too small (128 vs 16383)
drivers/media/v4l2-core/v4l2-ioctl.c:2876 video_usercopy() error: memset() 'parg' too small (128 vs 16383)

Store the ioctl size on a cache var, in order to suppress those.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/v4l2-core/v4l2-ioctl.c