mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Roel Kluin <12o3l@tiscali.nl>
To: Rik van Riel <riel@redhat.com>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>,
	pe1rxq@amsat.org, linux-usb@vger.kernel.org,
	video4linux-list@redhat.com, lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] logical-bitwise & confusion in se401_init()
Date: Thu, 13 Mar 2008 23:58:37 +0100	[thread overview]
Message-ID: <47D9B19D.5010709@tiscali.nl> (raw)
In-Reply-To: <20080313173000.5bd1d039@cuia.boston.redhat.com>

Rik van Riel wrote:
> On Thu, 13 Mar 2008 16:51:29 +0100
> Roel Kluin <12o3l@tiscali.nl> wrote:
> 
>> -	if (!cp[2] && SE401_FORMAT_BAYER) {
>> +	if (!cp[2] & SE401_FORMAT_BAYER) {
>>  		err("Bayer format not supported!");
>>  		return 1;
>>  	}
> 
> Would it be better to put in some additional parenthesis?
> 
> 	if (!(cp[2] & SE401_FORMAT_BAYER)) {
> 
yes of course, thanks for catching that.
---
logical-bitwise & confusion

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
---
diff --git a/drivers/media/video/se401.c b/drivers/media/video/se401.c
index d5d7d6c..9e8b521 100644
--- a/drivers/media/video/se401.c
+++ b/drivers/media/video/se401.c
@@ -1279,7 +1279,7 @@ static int se401_init(struct usb_se401 *se401, int button)
 	rc=se401_sndctrl(0, se401, SE401_REQ_GET_HEIGHT, 0, cp, sizeof(cp));
 	se401->cheight=cp[0]+cp[1]*256;
 
-	if (!cp[2] && SE401_FORMAT_BAYER) {
+	if (!(cp[2] & SE401_FORMAT_BAYER)) {
 		err("Bayer format not supported!");
 		return 1;
 	}

      reply	other threads:[~2008-03-13 22:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <47D47257.9090204@tiscali.nl>
     [not found] ` <20080313120602.6920a621@gaivota>
2008-03-13 15:51   ` [PATCH] logical-bitwise & confusion in se401_init() (was: logical-bitwise & confusion in se401_init()?) Roel Kluin
2008-03-13 21:30     ` Rik van Riel
2008-03-13 22:58       ` Roel Kluin [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=47D9B19D.5010709@tiscali.nl \
    --to=12o3l@tiscali.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mchehab@infradead.org \
    --cc=pe1rxq@amsat.org \
    --cc=riel@redhat.com \
    --cc=video4linux-list@redhat.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome