[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090408101303.71399654@hyperion.delvare>
Date: Wed, 8 Apr 2009 10:13:03 +0200
From: Jean Delvare <khali@...ux-fr.org>
To: Geert Uytterhoeven <geert@...ux-m68k.org>
Cc: Wolfram Sang <w.sang@...gutronix.de>,
LKML <linux-kernel@...r.kernel.org>,
Linux I2C <linux-i2c@...r.kernel.org>
Subject: Re: [GIT PULL] i2c updates for 2.6.30
Hi Geert,
On Tue, 7 Apr 2009 22:20:29 +0200, Geert Uytterhoeven wrote:
> On Sat, Mar 28, 2009 at 22:39, Jean Delvare <khali@...ux-fr.org> wrote:
> > Please pull the i2c subsystem updates for Linux 2.6.30 from:
>
> > Wolfram Sang (4):
> > i2c-algo-pca: Rework waiting for a free bus
>
> This one introduced:
>
> drivers/i2c/algos/i2c-algo-pca.c:197: warning: 'state' is used
> uninitialized in this function
>
> Probably
>
> while (pca_status(adap) != 0xf8) {
>
> should become
>
> while ((state = pca_status(adap)) != 0xf8) {
>
> again.
You're perfectly right, I must have missed it because I didn't build
any kernel with CONFIG_I2C_DEBUG_ALGO=y for a long time. Here's the fix
I will push to Linus soon:
From: Jean Delvare <khali@...ux-fr.org>
Subject: i2c-algo-pca: Fix use of uninitialized variable in debug message
A recent change broke debugging of pca_xfer(), fix it.
Reported-by: Geert Uytterhoeven <geert@...ux-m68k.org>
Signed-off-by: Jean Delvare <khali@...ux-fr.org>
Cc: Wolfram Sang <w.sang@...gutronix.de>
---
drivers/i2c/algos/i2c-algo-pca.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- linux-2.6.30-rc1.orig/drivers/i2c/algos/i2c-algo-pca.c 2009-04-08 08:52:48.000000000 +0200
+++ linux-2.6.30-rc1/drivers/i2c/algos/i2c-algo-pca.c 2009-04-08 10:06:36.000000000 +0200
@@ -190,7 +190,7 @@ static int pca_xfer(struct i2c_adapter *
int completed = 1;
unsigned long timeout = jiffies + i2c_adap->timeout;
- while (pca_status(adap) != 0xf8) {
+ while ((state = pca_status(adap)) != 0xf8) {
if (time_before(jiffies, timeout)) {
msleep(10);
} else {
--
Jean Delvare
--
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