From: Roel Kluin <12o3l@tiscali.nl>
To: Joe Perches <joe@perches.com>
Cc: mchehab@infradead.org, v4l-dvb-maintainer@linuxtv.org,
video4linux-list@redhat.com, lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] em28xx-core.c: add missing parentheses in em28xx_write_ac97()
Date: Wed, 05 Mar 2008 19:43:46 +0100 [thread overview]
Message-ID: <47CEE9E2.6040303@tiscali.nl> (raw)
In-Reply-To: <1204740974.17370.29.camel@localhost>
Joe Perches wrote:
>> - if (!((u8) ret) & 0x01)
>> + if (!(((u8) ret) & 0x01))
>
> I think it'd be clearer without the cast to (u8)
> which is then implicit cast back to int anyway
>
> if (!(ret & 1))
ok.
---
Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
---
diff --git a/drivers/media/video/em28xx/em28xx-core.c b/drivers/media/video/em28xx/em28xx-core.c
index 7d1537c..c797472 100644
--- a/drivers/media/video/em28xx/em28xx-core.c
+++ b/drivers/media/video/em28xx/em28xx-core.c
@@ -267,7 +267,7 @@ static int em28xx_write_ac97(struct em28xx *dev, u8 reg, u8 *val)
for (i = 0; i < 10; i++) {
if ((ret = em28xx_read_reg(dev, AC97BUSY_REG)) < 0)
return ret;
- if (!((u8) ret) & 0x01)
+ if (!(ret & 1))
return 0;
msleep(5);
}
next prev parent reply other threads:[~2008-03-05 18:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-05 17:55 [PATCH] em28xx-core.c: add missing parentheses in em28xx_write_ac97() Roel Kluin
2008-03-05 18:16 ` Joe Perches
2008-03-05 18:43 ` Roel Kluin [this message]
2008-03-10 12:23 ` Mauro Carvalho Chehab
2008-03-10 12:23 ` Mauro Carvalho Chehab
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=47CEE9E2.6040303@tiscali.nl \
--to=12o3l@tiscali.nl \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab@infradead.org \
--cc=v4l-dvb-maintainer@linuxtv.org \
--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 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.