2.6.28-mmotm1230 - include/media/v4l2-ioctl.h prototype mismatch
I'm seeing the following warning message during a kernel build:
CC [M] drivers/media/video/gspca/gspca.odrivers/media/video/gspca/gspca.c:1811: warning: initialization from incompatible pointer type
The root cause appears to be a missed prototype change in a conversion from ioctl to unlocked_ioctl - in struct file_operations, the former is an int, but the latter is a long. So we clean it up.
I have to admit not having checked deeply for second-order effects, but the kernel builds without warnings and the result works for me. The only other use of __video_ioctl2 I can see is in drivers/media/video/ivtv/ivtv-ioctl.c, and there it's used as a return value from a function already defined to return a long, so we save an int->long cast...
include/media/v4l2-ioctl.h renamed from include/media/v4l2-ioctl.h.dist +1 -1
@@ -297,7 +297,7 @@ extern int video_usercopy(struct file *f/* Standard handlers for V4L ioctl's */ /* This prototype is used on fops.unlocked_ioctl */ -extern int __video_ioctl2 (struct file *file, +extern long __video_ioctl2 (struct file *file,unsigned int cmd,unsigned long arg);/* This prototype is used on fops.ioctl
drivers/media/video/v4l2-ioctl.c renamed from drivers/media/video/v4l2-ioctl.c.dist +1 -1
@@ -1852,7 +1852,7 @@ static int __video_do_ioctl(struct filereturn ret; } -int __video_ioctl2 (struct file *file, +long __video_ioctl2 (struct file *file,unsigned int cmd,unsigned long arg) {char sbuf[128 ];
Quoted 31 lines · On Fri, 02 Jan 2009 05:51:26 -0500 [email protected] wrote:
I'm seeing the following warning message during a kernel build:
CC [M]
drivers/media/video/gspca/gspca.odrivers/media/video/gspca/gspca.c:1811: warning: initialization from incompatible pointer typeThe root cause appears to be a missed prototype change in a conversion from ioctl to
unlocked_ioctl- in structfile_operations, the former is an int, but the latter is a long. So we clean it up.I have to admit not having checked deeply for second-order effects, but the kernel builds without warnings and the result works for me. The only other use of
__video_ioctl2I can see is indrivers/media/video/ivtv/ivtv-ioctl.c, and there it's used as a return value from a function already defined to return a long, so we save anint->longcast...Signed-off-by Valdis Kletnieks <[email protected]>include/media/v4l2-ioctl.h renamed from include/media/v4l2-ioctl.h.dist +1
-1@@ -297,7 +297,7 @@ extern int video_usercopy(struct file *f/* Standard handlers for V4L ioctl's */ /* This prototype is used on fops.unlocked_ioctl */ -extern int __video_ioctl2 (struct file *file, +extern long __video_ioctl2 (struct file *file,unsigned int cmd,unsigned long arg);/* This prototype is used on fops.ioctl
drivers/media/video/v4l2-ioctl.c static int __video_do_ioctl(struct file · line 1858
Quoted 8 lines
drivers/media/video/v4l2-ioctl.c renamed from drivers/media/video/v4l2-ioctl.c.dist +1
-1@@ -1852,7 +1852,7 @@ static int __video_do_ioctl(struct filereturn ret; } -int __video_ioctl2 (struct file *file, +long __video_ioctl2 (struct file *file,unsigned int cmd,unsigned long arg) {char sbuf[128 ];
That code seems to have magically disappeared from linux-next.
--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list