public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] saa7146_i2c: saa7146_i2c_transfer() wrong?
@ 2009-01-31 16:52 Roel Kluin
  2009-02-01 10:55 ` Jean Delvare
  0 siblings, 1 reply; 2+ messages in thread
From: Roel Kluin @ 2009-01-31 16:52 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: linux-media, linux-i2c

vi drivers/media/common/saa7146_i2c.c +292

in saa7146_i2c_transfer(..., int retries) 
{
	int address_err = 0;
	do {
		...
		if (...)
			address_err++;
		...
	} while (retries--);

	/* if every retry had an address error, exit right away */
        if (address_err == retries) {
                goto out;
        }
	...
}
this is wrong, isn't it?

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] saa7146_i2c: saa7146_i2c_transfer() wrong?
  2009-01-31 16:52 [PATCH] saa7146_i2c: saa7146_i2c_transfer() wrong? Roel Kluin
@ 2009-02-01 10:55 ` Jean Delvare
  0 siblings, 0 replies; 2+ messages in thread
From: Jean Delvare @ 2009-02-01 10:55 UTC (permalink / raw)
  To: Roel Kluin; +Cc: Mauro Carvalho Chehab, linux-media, linux-i2c

On Sat, 31 Jan 2009 17:52:05 +0100, Roel Kluin wrote:
> vi drivers/media/common/saa7146_i2c.c +292
> 
> in saa7146_i2c_transfer(..., int retries) 
> {
> 	int address_err = 0;
> 	do {
> 		...
> 		if (...)
> 			address_err++;
> 		...
> 	} while (retries--);
> 
> 	/* if every retry had an address error, exit right away */
>         if (address_err == retries) {
>                 goto out;
>         }
> 	...
> }
> this is wrong, isn't it?

Yes, it looks pretty wrong, however the linux-i2c list isn't the right
place to discuss this.

-- 
Jean Delvare

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-02-01 10:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-31 16:52 [PATCH] saa7146_i2c: saa7146_i2c_transfer() wrong? Roel Kluin
2009-02-01 10:55 ` Jean Delvare

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox