From: Hans Verkuil Date: Mon, 17 Mar 2014 12:54:23 +0000 (-0300) Subject: [media] v4l2-ioctl.c: fix sparse __user-related warnings X-Git-Tag: omap-for-v3.16/fixes-against-rc1~25^2~266 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ba2d35c14b6fc554547cf647bedb71cd9ead3cab;p=pandora-kernel.git [media] v4l2-ioctl.c: fix sparse __user-related warnings Fix the use of __user in the check_array_args() prototype: instead of using 'void * __user *' you should use 'void __user **' for sparse to understand this correctly. This also required the use of __force in the '*kernel_ptr = user_ptr' assignment. Also replace a wrong cast (void *) with the correct one (void **) in check_array_args(). This fixes these sparse warnings: drivers/media/v4l2-core/v4l2-ioctl.c:2284:35: warning: incorrect type in assignment (different address spaces) drivers/media/v4l2-core/v4l2-ioctl.c:2301:35: warning: incorrect type in assignment (different address spaces) drivers/media/v4l2-core/v4l2-ioctl.c:2319:35: warning: incorrect type in assignment (different address spaces) drivers/media/v4l2-core/v4l2-ioctl.c:2386:57: warning: incorrect type in argument 4 (different address spaces) drivers/media/v4l2-core/v4l2-ioctl.c:2420:29: warning: incorrect type in assignment (different address spaces) Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- Reading git-diff-tree failed