Skip to contentSkip to conversation

saa7146_i2c: saa7146_i2c_transfer() wrong?

PATCH In review Roel Kluin 2 participants 2 messages Jan 31, 2009 – Feb 1, 2009 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

Roel Kluin

author
#0 lore raw

PATCH 1/1 saa7146_i2c: saa7146_i2c_transfer() wrong?

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?

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw
Quoted 18 lines · Roel Kluin

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;
        }
	...
}
Quoted 1 line

this is wrong, isn't it?

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

Signature · 1 line
Jean Delvare