mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Wolfram Sang <w.sang@pengutronix.de>
To: Jean Delvare <khali@linux-fr.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
	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:15:22 +0200	[thread overview]
Message-ID: <20090408081522.GB3072@pengutronix.de> (raw)
In-Reply-To: <20090408101303.71399654@hyperion.delvare>

[-- Attachment #1: Type: text/plain, Size: 2314 bytes --]

On Wed, Apr 08, 2009 at 10:13:03AM +0200, Jean Delvare wrote:
> 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>

Heh, I was too slow :)

Acked-by: 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
> --
> To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

      reply	other threads:[~2009-04-08  8:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-28 20:39 Jean Delvare
2009-04-07 20:20 ` Geert Uytterhoeven
2009-04-08  8:03   ` Wolfram Sang
2009-04-08  8:13   ` Jean Delvare
2009-04-08  8:15     ` Wolfram Sang [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=20090408081522.GB3072@pengutronix.de \
    --to=w.sang@pengutronix.de \
    --cc=geert@linux-m68k.org \
    --cc=khali@linux-fr.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®