Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[media] Fix compile warning: Dereferencing type-punned pointer will break strict-aliasing rules

Signed-off-by: Hans Petter Selasky <hselasky@c2i.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

authored by

Hans Petter Selasky and committed by
Mauro Carvalho Chehab
2ef40370 82f7b59c

+2 -2
+2 -2
drivers/media/video/v4l2-ioctl.c
··· 2276 2276 break; 2277 2277 } 2278 2278 *user_ptr = (void __user *)buf->m.planes; 2279 - *kernel_ptr = (void **)&buf->m.planes; 2279 + *kernel_ptr = (void *)&buf->m.planes; 2280 2280 *array_size = sizeof(struct v4l2_plane) * buf->length; 2281 2281 ret = 1; 2282 2282 } ··· 2290 2290 2291 2291 if (ctrls->count != 0) { 2292 2292 *user_ptr = (void __user *)ctrls->controls; 2293 - *kernel_ptr = (void **)&ctrls->controls; 2293 + *kernel_ptr = (void *)&ctrls->controls; 2294 2294 *array_size = sizeof(struct v4l2_ext_control) 2295 2295 * ctrls->count; 2296 2296 ret = 1;