[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <47CEE9E2.6040303@tiscali.nl>
Date: Wed, 05 Mar 2008 19:43:46 +0100
From: Roel Kluin <12o3l@...cali.nl>
To: Joe Perches <joe@...ches.com>
CC: mchehab@...radead.org, v4l-dvb-maintainer@...uxtv.org,
video4linux-list@...hat.com, lkml <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] em28xx-core.c: add missing parentheses in em28xx_write_ac97()
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@...cali.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);
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists