* [PATCH] Make nchg variable signed because the code compares this variable against negative values.
@ 2011-05-23 11:09 Hans Petter Selasky
2011-05-26 0:07 ` Mauro Carvalho Chehab
0 siblings, 1 reply; 3+ messages in thread
From: Hans Petter Selasky @ 2011-05-23 11:09 UTC (permalink / raw)
To: linux-media; +Cc: Mauro Carvalho Chehab
[-- Attachment #1: Type: text/plain, Size: 6 bytes --]
--HPS
[-- Attachment #2: dvb-usb-0006.patch --]
[-- Type: text/x-patch, Size: 815 bytes --]
From b05d4913df24f11c7b7a2e07201bb87a04a949bc Mon Sep 17 00:00:00 2001
From: Hans Petter Selasky <hselasky@c2i.net>
Date: Mon, 23 May 2011 13:09:18 +0200
Subject: [PATCH] Make nchg variable signed because the code compares this variable against negative values.
Signed-off-by: Hans Petter Selasky <hselasky@c2i.net>
---
drivers/media/video/gspca/sonixj.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/media/video/gspca/sonixj.c b/drivers/media/video/gspca/sonixj.c
index 6415aff..81b8a60 100644
--- a/drivers/media/video/gspca/sonixj.c
+++ b/drivers/media/video/gspca/sonixj.c
@@ -60,7 +60,7 @@ struct sd {
u32 pktsz; /* (used by pkt_scan) */
u16 npkt;
- u8 nchg;
+ s8 nchg;
s8 short_mark;
u8 quality; /* image quality */
--
1.7.1.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Make nchg variable signed because the code compares this variable against negative values.
2011-05-23 11:09 [PATCH] Make nchg variable signed because the code compares this variable against negative values Hans Petter Selasky
@ 2011-05-26 0:07 ` Mauro Carvalho Chehab
2011-05-26 6:48 ` Jean-Francois Moine
0 siblings, 1 reply; 3+ messages in thread
From: Mauro Carvalho Chehab @ 2011-05-26 0:07 UTC (permalink / raw)
To: jean-francois Moine; +Cc: Hans Petter Selasky, linux-media
Jean-François,
This patch looks ok to me, although the description is not 100%.
The sonixj driver compares the value for nchg with
if (sd->nchg < -6 || sd->nchg >= 12) {
With u8, negative values won't work.
Please check.
Thanks!
Mauro
Em 23-05-2011 08:09, Hans Petter Selasky escreveu:
> --HPS
>
>
> dvb-usb-0006.patch
>
>
> From b05d4913df24f11c7b7a2e07201bb87a04a949bc Mon Sep 17 00:00:00 2001
> From: Hans Petter Selasky <hselasky@c2i.net>
> Date: Mon, 23 May 2011 13:09:18 +0200
> Subject: [PATCH] Make nchg variable signed because the code compares this variable against negative values.
>
> Signed-off-by: Hans Petter Selasky <hselasky@c2i.net>
> ---
> drivers/media/video/gspca/sonixj.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/media/video/gspca/sonixj.c b/drivers/media/video/gspca/sonixj.c
> index 6415aff..81b8a60 100644
> --- a/drivers/media/video/gspca/sonixj.c
> +++ b/drivers/media/video/gspca/sonixj.c
> @@ -60,7 +60,7 @@ struct sd {
>
> u32 pktsz; /* (used by pkt_scan) */
> u16 npkt;
> - u8 nchg;
> + s8 nchg;
> s8 short_mark;
>
> u8 quality; /* image quality */
> -- 1.7.1.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Make nchg variable signed because the code compares this variable against negative values.
2011-05-26 0:07 ` Mauro Carvalho Chehab
@ 2011-05-26 6:48 ` Jean-Francois Moine
0 siblings, 0 replies; 3+ messages in thread
From: Jean-Francois Moine @ 2011-05-26 6:48 UTC (permalink / raw)
To: Mauro Carvalho Chehab; +Cc: Hans Petter Selasky, linux-media
On Wed, 25 May 2011 21:07:17 -0300
Mauro Carvalho Chehab <mchehab@redhat.com> wrote:
> This patch looks ok to me, although the description is not 100%.
>
> The sonixj driver compares the value for nchg with
> if (sd->nchg < -6 || sd->nchg >= 12) {
>
> With u8, negative values won't work.
>
> Please check.
Hi Mauro and Hans Petter,
With all the messages in the list, I did not noticed this patch.
Indeed, the fix is correct. I was wondering why there were still
problems with the image size in sonixj. They should disappear now.
Thanks.
--
Ken ar c'hentañ | ** Breizh ha Linux atav! **
Jef | http://moinejf.free.fr/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-05-26 6:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-23 11:09 [PATCH] Make nchg variable signed because the code compares this variable against negative values Hans Petter Selasky
2011-05-26 0:07 ` Mauro Carvalho Chehab
2011-05-26 6:48 ` Jean-Francois Moine
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.