All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Németh Márton" <nm127@freemail.hu>
To: Jean-Francois Moine <moinejf@free.fr>
Cc: V4L Mailing List <linux-media@vger.kernel.org>
Subject: Re: [PATCH] gspca m5602: eliminate sparse warnings
Date: Sat, 12 Dec 2009 12:15:02 +0100	[thread overview]
Message-ID: <4B237B36.2030609@freemail.hu> (raw)
In-Reply-To: <20091212112145.228bb01c@tele>

Jean-Francois Moine wrote:
> On Fri, 11 Dec 2009 22:33:36 +0100
> Németh Márton <nm127@freemail.hu> wrote:
> 
>> From: Márton Németh <nm127@freemail.hu>
>>
>> Eliminate the following sparse warnings (see "make C=1"):
>>  * v4l/m5602_s5k4aa.c:530:23: warning: dubious: x | !y
>>  * v4l/m5602_s5k4aa.c:575:23: warning: dubious: x | !y
>>
>> Signed-off-by: Márton Németh <nm127@freemail.hu>
>> ---
>> ../../m5602_s5k4aa_dubious.patch
>> diff -r f5662ce08663
>> linux/drivers/media/video/gspca/m5602/m5602_s5k4aa.c ---
>> a/linux/drivers/media/video/gspca/m5602/m5602_s5k4aa.c	Fri Dec
>> 11 09:53:41 2009 +0100 +++
>> b/linux/drivers/media/video/gspca/m5602/m5602_s5k4aa.c	Fri Dec
>> 11 22:25:50 2009 +0100 @@ -527,7 +527,7 @@ err =
>> m5602_read_sensor(sd, S5K4AA_ROWSTART_LO, &data, 1); if (err < 0)
>> return err;
>> -	data = (data & 0xfe) | !val;
>> +	data = (data & 0xfe) | (val ? 0 : 1);
>>  	err = m5602_write_sensor(sd, S5K4AA_ROWSTART_LO, &data, 1);
>>  	return err;
>>  }
>> @@ -572,7 +572,7 @@
>>  	err = m5602_read_sensor(sd, S5K4AA_COLSTART_LO, &data, 1);
>>  	if (err < 0)
>>  		return err;
>> -	data = (data & 0xfe) | !val;
>> +	data = (data & 0xfe) | (val ? 0 : 1);
>>  	err = m5602_write_sensor(sd, S5K4AA_COLSTART_LO, &data, 1);
>>  	return err;
>>  }
> 
> Thanks, but I fixed it in an other way.

No problem as long as the warning message is removed.

Regards,

	Márton Németh

      reply	other threads:[~2009-12-12 11:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-11 21:33 [PATCH] gspca m5602: eliminate sparse warnings Németh Márton
2009-12-12 10:21 ` Jean-Francois Moine
2009-12-12 11:15   ` Németh Márton [this message]

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=4B237B36.2030609@freemail.hu \
    --to=nm127@freemail.hu \
    --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.