Patch drivers/media/video/mt9v022.c
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Of course, I attached the patch.
Thanks for your time and sorry because I didn't read the documentation.
----- Original Message ----
From: Guennadi Liakhovetski <[email protected]>
To: Poyo VL <[email protected]>
Sent: Tue, August 31, 2010 11:34:50 PM
Subject: Re: Patch
Hi!
Quoted 9 lines · Poyo VL
Kernel: 2.6.35.4
File:include/media/v4l2-mediabus.hPatch:
(quoted diff) +2
-1- V4L2_MBUS_FMT_FIXED = 1, + V4L2_MBUS_FMT_NO_FORMAT = 0, + V4L2_MBUS_FMT_FIXED,
Quoted 5 lines
Added a 0 value to the
v4l2_mbus_pixelcodestructure, it is used ondrivers/media/video/mt9v022.con line 405 in aswitch(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/
mt9v022_2.c renamed from mt9v022.c +0 -3
@@ -402,9 +402,6 @@if (mt9v022->model !=V4L2_IDENT_MT9V022IX7ATC )return -EINVAL ;break ; -case 0 : -/* No format change, only geometry */ -break ;default :return -EINVAL ; }
Quoted 3 lines · Poyo VL
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
Quoted 36 lines
----- Original Message ----
From: Guennadi Liakhovetski <[email protected]>
To: Poyo VL <[email protected]>
Sent: Tue, August 31, 2010 11:34:50 PM
Subject: Re: PatchHi!
Quoted 9 lines · Poyo VL
Kernel: 2.6.35.4
File:include/media/v4l2-mediabus.hPatch:
(quoted diff) +2
-1- V4L2_MBUS_FMT_FIXED = 1, + V4L2_MBUS_FMT_NO_FORMAT = 0, + V4L2_MBUS_FMT_FIXED,Quoted 5 lines
Added a 0 value to the
v4l2_mbus_pixelcodestructure, it is used ondrivers/media/video/mt9v022.con line 405 in aswitch(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:
mt9v022_2.c renamed from mt9v022.c +0
-3-case 0 : -/* No format change, only geometry */ -break ;
Quoted 3 lines
If you like, you can submit a patch to do that. But please follow patch submission guidelines, as outlined in
Documentation/SubmittingPatchesin 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/
PATCH 1/1 drivers/media/video/mt9v022.c (2.6.35.4): Fixed compilation warning
From: Ionut Gabriel Popescu <[email protected]>
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.
---
drivers/media/video/mt9v022.c 2010-09-01 16:12:00.704505851 +0300 renamed from drivers/media/video/mt9v022.c 2010-08-27 02:47:12.000000000 +0300 +0 -3
@@ -402,9 +402,6 @@ if (mt9v022->model != V4L2_IDENT_MT9V022IX7ATC) return -EINVAL; break; - case 0: - /* No format change, only geometry */ - break; default: return -EINVAL; }
Re: [PATCH] drivers/media/video/mt9v022.c (2.6.35.4): Fixed compilation warning
Quoted 6 lines · Poyo VL
From: Ionut Gabriel Popescu <[email protected]>
Kernel: 2.6.35.4The
drivers/media/video/mt9v022.cfile, on line 405, tries a "case 0" o av4l2_mbus_pixelcodeenum 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
Quoted 12 lines
Signed-off-by Ionut Gabriel Popescu <[email protected]>---
drivers/media/video/mt9v022.c 2010-09-01 16:12:00.704505851 +0300 line 407
Quoted 9 lines
drivers/media/video/mt9v022.c 2010-09-01 16:12:00.704505851 +0300 renamed from drivers/media/video/mt9v022.c 2010-08-27 02:47:12.000000000 +0300 +0
-3@@ -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/