All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@redhat.com>
To: jean-francois Moine <moinejf@free.fr>
Cc: Hans Petter Selasky <hselasky@c2i.net>,
	"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>
Subject: Re: [PATCH] Make nchg variable signed because the code compares this variable against negative values.
Date: Wed, 25 May 2011 21:07:17 -0300	[thread overview]
Message-ID: <4DDD99B5.2050105@redhat.com> (raw)
In-Reply-To: <201105231309.54265.hselasky@c2i.net>

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



  reply	other threads:[~2011-05-26  0:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2011-05-26  6:48   ` Jean-Francois Moine

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4DDD99B5.2050105@redhat.com \
    --to=mchehab@redhat.com \
    --cc=hselasky@c2i.net \
    --cc=linux-media@vger.kernel.org \
    --cc=moinejf@free.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.