Re: [PATCH] drivers/media/video/mt9v022.c (2.6.35.4): Fixed compilation warning
On Fri, 3 Sep 2010, Poyo VL wrote: > From: Ionut Gabriel Popescu > Kernel: 2.6.35.4 > > The drivers/media/video/mt9v022.c file, on line 405, tries a "case 0" o a > v4l2_mbus_pixelcode enum which don't have an 0 value element, so I got a > compile > warning. That "case" is useless so it can be removed. This looks much better, thanks! I'll take it from here. Regards Guennadi > > > Signed-off-by: Ionut Gabriel Popescu > --- > > --- a/drivers/media/video/mt9v022.c2010-08-27 02:47:12.0 +0300 > +++ b/drivers/media/video/mt9v022.c2010-09-01 16:12:00.704505851 +0300 > @@ -402,9 +402,6 @@ > if (mt9v022->model != V4L2_IDENT_MT9V022IX7ATC) > return -EINVAL; > break; > -case 0: > -/* No format change, only geometry */ > -break; > default: > return -EINVAL; > } > > > > --- Guennadi Liakhovetski, Ph.D. Freelance Open-Source Software Developer http://www.open-technology.de/ -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] drivers/media/video/mt9v022.c (2.6.35.4): Fixed compilation warning
From: Ionut Gabriel Popescu Kernel: 2.6.35.4 The drivers/media/video/mt9v022.c file, on line 405, tries a "case 0" o a v4l2_mbus_pixelcode enum which don't have an 0 value element, so I got a compile warning. That "case" is useless so it can be removed. Signed-off-by: Ionut Gabriel Popescu --- --- a/drivers/media/video/mt9v022.c2010-08-27 02:47:12.0 +0300 +++ b/drivers/media/video/mt9v022.c2010-09-01 16:12:00.704505851 +0300 @@ -402,9 +402,6 @@ if (mt9v022->model != V4L2_IDENT_MT9V022IX7ATC) return -EINVAL; break; -case 0: -/* No format change, only geometry */ -break; default: return -EINVAL; } -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Patch drivers/media/video/mt9v022.c
On Wed, 1 Sep 2010, Poyo VL wrote: > Of course, I attached the patch. > > Thanks for your time and sorry because I didn't read the documentation. Thanks, but still not quite right. Most importantly three compulsory things are missing: (1) a descriptive subject like [PATCH] mt9v022: short description of your patch (2) then in the body a longer description like: This patch fixes a compiler warning in driver X by removing dead code. And your "Signed-off-by:" line is also missing. Without these three things no patch can be accepted in the kernel (ok, (2) is missing sometimes, if a patch is really trivial and the subject explains sufficiently, but (1) and (3) must be there). All this is described in the referred document, so, looks like you still haven't read it very attentively. Thanks Guennadi > - Original Message > From: Guennadi Liakhovetski > To: Poyo VL > Sent: Tue, August 31, 2010 11:34:50 PM > Subject: Re: Patch > > Hi! > > On Tue, 31 Aug 2010, Poyo VL wrote: > > > Kernel: 2.6.35.4 > > File: include/media/v4l2-mediabus.h > > > > Patch: > > > > -V4L2_MBUS_FMT_FIXED = 1, > > +V4L2_MBUS_FMT_NO_FORMAT = 0, > > +V4L2_MBUS_FMT_FIXED, > > > > Added a 0 value to the v4l2_mbus_pixelcode structure, it is used on > > drivers/media/video/mt9v022.c on line 405 in a switch(mf->code) where code > > cannot be 0, so I get warning. > > > > I know it is not extremly important... > > Thanks for your report and your patch! Fixing compiler warnings is > important too, so, this does deserve a patch. However, I think, we have to > patch not the generic code, but rather the mt9v022 driver. That "case 0:" > has been left there by accident since the very first version, whereas it > had to be killed a long time ago. So, the correct fix would be to just > kill these three lines there: > > -case 0: > -/* No format change, only geometry */ > -break; > > If you like, you can submit a patch to do that. But please follow patch > submission guidelines, as outlined in Documentation/SubmittingPatches in > your kernel tree. And don't forget to CC the linux-media mailing list. --- Guennadi Liakhovetski, Ph.D. Freelance Open-Source Software Developer http://www.open-technology.de/ -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Patch drivers/media/video/mt9v022.c
Of course, I attached the patch. Thanks for your time and sorry because I didn't read the documentation. - Original Message From: Guennadi Liakhovetski To: Poyo VL Sent: Tue, August 31, 2010 11:34:50 PM Subject: Re: Patch Hi! On Tue, 31 Aug 2010, Poyo VL wrote: > Kernel: 2.6.35.4 > File: include/media/v4l2-mediabus.h > > Patch: > > -V4L2_MBUS_FMT_FIXED = 1, > +V4L2_MBUS_FMT_NO_FORMAT = 0, > +V4L2_MBUS_FMT_FIXED, > > Added a 0 value to the v4l2_mbus_pixelcode structure, it is used on > drivers/media/video/mt9v022.c on line 405 in a switch(mf->code) where code > cannot be 0, so I get warning. > > I know it is not extremly important... Thanks for your report and your patch! Fixing compiler warnings is important too, so, this does deserve a patch. However, I think, we have to patch not the generic code, but rather the mt9v022 driver. That "case 0:" has been left there by accident since the very first version, whereas it had to be killed a long time ago. So, the correct fix would be to just kill these three lines there: -case 0: -/* No format change, only geometry */ -break; If you like, you can submit a patch to do that. But please follow patch submission guidelines, as outlined in Documentation/SubmittingPatches in your kernel tree. And don't forget to CC the linux-media mailing list. Thanks Guennadi --- Guennadi Liakhovetski, Ph.D. Freelance Open-Source Software Developer http://www.open-technology.de/ patch_mt9v022.diff Description: Binary data