From: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
To: Geert Uytterhoeven <geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
Cc: Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>,
LKML <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Linux I2C <linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [GIT PULL] i2c updates for 2.6.30
Date: Wed, 8 Apr 2009 10:13:03 +0200 [thread overview]
Message-ID: <20090408101303.71399654@hyperion.delvare> (raw)
In-Reply-To: <10f740e80904071320t2fdd073bs51f3a8abf0f60e36-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
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-PUYAD+kWke1g9hUCZPvPmw@public.gmane.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-PUYAD+kWke1g9hUCZPvPmw@public.gmane.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-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
Signed-off-by: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
Cc: Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
---
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
WARNING: multiple messages have this Message-ID (diff)
From: Jean Delvare <khali@linux-fr.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Wolfram Sang <w.sang@pengutronix.de>,
LKML <linux-kernel@vger.kernel.org>,
Linux I2C <linux-i2c@vger.kernel.org>
Subject: Re: [GIT PULL] i2c updates for 2.6.30
Date: Wed, 8 Apr 2009 10:13:03 +0200 [thread overview]
Message-ID: <20090408101303.71399654@hyperion.delvare> (raw)
In-Reply-To: <10f740e80904071320t2fdd073bs51f3a8abf0f60e36@mail.gmail.com>
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@linux-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@linux-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@linux-m68k.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Wolfram Sang <w.sang@pengutronix.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
next prev parent reply other threads:[~2009-04-08 8:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-28 20:39 [GIT PULL] i2c updates for 2.6.30 Jean Delvare
2009-03-28 20:39 ` Jean Delvare
[not found] ` <20090328213950.1c788471-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2009-04-07 20:20 ` Geert Uytterhoeven
2009-04-07 20:20 ` Geert Uytterhoeven
[not found] ` <10f740e80904071320t2fdd073bs51f3a8abf0f60e36-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-04-08 8:03 ` Wolfram Sang
2009-04-08 8:03 ` Wolfram Sang
2009-04-08 8:13 ` Jean Delvare [this message]
2009-04-08 8:13 ` Jean Delvare
[not found] ` <20090408101303.71399654-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2009-04-08 8:15 ` Wolfram Sang
2009-04-08 8:15 ` Wolfram Sang
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=20090408101303.71399654@hyperion.delvare \
--to=khali-puyad+kwke1g9huczpvpmw@public.gmane.org \
--cc=geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
/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.