Skip to contentSkip to conversation

Wrong returned value of __video_ioctl2()

PATCH In review Jean-Francois Moine 2 participants 2 messages Dec 23, 2008 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Wrong returned value of __video_ioctl2()

This patch suppresses the warning on setting the dev_fops unlocked_ioctl function to __video_ioctl2.

linux/drivers/media/video/v4l2-ioctl.c +1 -1
diff -r c7b89ff3a3df linux/drivers/media/video/v4l2-ioctl.c
@@ -1853,7 +1853,7 @@
 	return ret;
 }
 
-int __video_ioctl2(struct file *file,
+long __video_ioctl2(struct file *file,
 	       unsigned int cmd, unsigned long arg)
 {
 	char	sbuf[128];
linux/include/media/v4l2-ioctl.h +1 -1
diff -r c7b89ff3a3df linux/include/media/v4l2-ioctl.h
@@ -297,7 +297,7 @@
 /* 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
Signature · 8 lines
Ken ar c'hentañ |             ** Breizh ha Linux atav! **
Jef             |               http://moinejf.free.fr/


--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
#1 lore raw
Quoted 4 lines · On Tuesday 23 December 2008 20:54:38 Jean-Francois Moine wrote:

This patch suppresses the warning on setting the dev_fops unlocked_ioctl function to __video_ioctl2.

Hi Jean-Francois,

This patch clashes with an other pull request from me where the whole __video_ioctl2 function disappears.

But the prototype is indeed wrong and so I will go through my code and ensure that all the ioctl return types are long.

Thank you for bringing this to our attention and I'll make sure to fix these prototypes.

Regards,

Hans

Quoted 25 lines

diff -r c7b89ff3a3df linux/drivers/media/video/v4l2-ioctl.c
--- a/linux/drivers/media/video/v4l2-ioctl.c Tue Dec 23 19:57:17 2008
+0100 +++ b/linux/drivers/media/video/v4l2-ioctl.c Tue Dec 23 20:42:08
2008 +0100 @@ -1853,7 +1853,7 @@

linux/drivers/media/video/v4l2-ioctl.c +1 -1
 	return ret;
 }
 
-int __video_ioctl2(struct file *file,
+long __video_ioctl2(struct file *file,
 	       unsigned int cmd, unsigned long arg)
 {
 	char	sbuf[128];

diff -r c7b89ff3a3df linux/include/media/v4l2-ioctl.h

linux/include/media/v4l2-ioctl.h +1 -1
@@ -297,7 +297,7 @@
 /* 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
Signature · 6 lines
Hans Verkuil - video4linux developer - sponsored by TANDBERG

--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list