[PATCH] Video : pwc : Fix regression in pwc_set_shutter_speed caused by bad constant => sizeof conversion.
Regression was caused by my commit 6b35ca0d3d586b8ecb8396821af21186e20afaf0 which determined message size using sizeof rather than hardcoded constants. Unfortunately pwc_set_shutter_speed reuses a 2 byte buffer for a one byte message too so the sizeof was bogus in this case. All other uses of sizeof checked and are ok. Acked-by: Laurent Pinchart CC: sta...@kernel.org Signed-off-by: Martin Fuzzey --- drivers/media/video/pwc/pwc-ctrl.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/media/video/pwc/pwc-ctrl.c b/drivers/media/video/pwc/pwc-ctrl.c index 50b415e..f7f7e04 100644 --- a/drivers/media/video/pwc/pwc-ctrl.c +++ b/drivers/media/video/pwc/pwc-ctrl.c @@ -753,7 +753,7 @@ int pwc_set_shutter_speed(struct pwc_device *pdev, int mode, int value) buf[0] = 0xff; /* fixed */ ret = send_control_msg(pdev, - SET_LUM_CTL, SHUTTER_MODE_FORMATTER, &buf, sizeof(buf)); + SET_LUM_CTL, SHUTTER_MODE_FORMATTER, &buf, 1); if (!mode && ret >= 0) { if (value < 0) -- 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] Video : pwc : Fix regression in pwc_set_shutter_speed caused by bad constant => sizeof conversion.
On Saturday 30 January 2010 17:26:51 Martin Fuzzey wrote: > Regression was caused by my commit 6b35ca0d3d586b8ecb8396821af21186e20afaf0 > which determined message size using sizeof rather than hardcoded constants. > > Unfortunately pwc_set_shutter_speed reuses a 2 byte buffer for a one byte > message too so the sizeof was bogus in this case. > > All other uses of sizeof checked and are ok. > > Signed-off-by: Martin Fuzzey Acked-by: Laurent Pinchart > > --- > > drivers/media/video/pwc/pwc-ctrl.c |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/drivers/media/video/pwc/pwc-ctrl.c > b/drivers/media/video/pwc/pwc-ctrl.c index 50b415e..f7f7e04 100644 > --- a/drivers/media/video/pwc/pwc-ctrl.c > +++ b/drivers/media/video/pwc/pwc-ctrl.c > @@ -753,7 +753,7 @@ int pwc_set_shutter_speed(struct pwc_device *pdev, int > mode, int value) buf[0] = 0xff; /* fixed */ > > ret = send_control_msg(pdev, > - SET_LUM_CTL, SHUTTER_MODE_FORMATTER, &buf, sizeof(buf)); > + SET_LUM_CTL, SHUTTER_MODE_FORMATTER, &buf, 1); > > if (!mode && ret >= 0) { > if (value < 0) > -- Regards, Laurent Pinchart -- 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] Video : pwc : Fix regression in pwc_set_shutter_speed caused by bad constant => sizeof conversion.
Regression was caused by my commit 6b35ca0d3d586b8ecb8396821af21186e20afaf0 which determined message size using sizeof rather than hardcoded constants. Unfortunately pwc_set_shutter_speed reuses a 2 byte buffer for a one byte message too so the sizeof was bogus in this case. All other uses of sizeof checked and are ok. Signed-off-by: Martin Fuzzey --- drivers/media/video/pwc/pwc-ctrl.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/media/video/pwc/pwc-ctrl.c b/drivers/media/video/pwc/pwc-ctrl.c index 50b415e..f7f7e04 100644 --- a/drivers/media/video/pwc/pwc-ctrl.c +++ b/drivers/media/video/pwc/pwc-ctrl.c @@ -753,7 +753,7 @@ int pwc_set_shutter_speed(struct pwc_device *pdev, int mode, int value) buf[0] = 0xff; /* fixed */ ret = send_control_msg(pdev, - SET_LUM_CTL, SHUTTER_MODE_FORMATTER, &buf, sizeof(buf)); + SET_LUM_CTL, SHUTTER_MODE_FORMATTER, &buf, 1); if (!mode && ret >= 0) { if (value < 0) -- 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: fix regression in pwc_set_shutter_speed???
On Sat, Jan 30, 2010 at 04:43:19PM +0100, Martin Fuzzey wrote: > Greg KH wrote: > > Video developers, any comments? > > > > Jef, were you able to narrow it down to the actual patch that caused the > > problem. > > > > > Indeed it was my commit 6b35ca0d3d586b8ecb8396821af21186e20afaf0 > > I somehow missed the email from Laurent back in August about this. > > Am checking the rest of that commit now and will send a fix patch soon. > > Sorry about that. No problem, can you also send it to sta...@kernel.org when it is in Linus's tree? thanks, greg k-h -- 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: fix regression in pwc_set_shutter_speed???
Greg KH wrote: > Video developers, any comments? > > Jef, were you able to narrow it down to the actual patch that caused the > problem. > > Indeed it was my commit 6b35ca0d3d586b8ecb8396821af21186e20afaf0 I somehow missed the email from Laurent back in August about this. Am checking the rest of that commit now and will send a fix patch soon. Sorry about that. Martin -- 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: fix regression in pwc_set_shutter_speed???
On Sat, Jan 30, 2010 at 12:03:09AM +, Jef Treece wrote: > Here's a link to the previous message: > http://www.mail-archive.com/linux-media@vger.kernel.org/msg14330.html Great. Video developers, any comments? Jef, were you able to narrow it down to the actual patch that caused the problem. thanks, greg k-h -- 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: fix regression in pwc_set_shutter_speed???
On Fri, Jan 29, 2010 at 12:45:37AM +, Jef Treece wrote: > I reported a regression and provided a fix a few months ago for a > regression in pwc_set_shutter_speed that was introduced in approx > April 2009. Is that regression going to get fixed? It's really causing > a lot of pain because it means a custom kernel build every time. Does someone have a patch for it? Have a pointer to the email previously describing it? thanks, greg k-h -- 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