Re: [PATCH 53/64] i2c: st: reword according to newest specification

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > -	unsigned long timeout;
> > +	unsigned long time_left;
> 
> Thanks for doing this. Is the timeout v/s time_left language also due to the specification change?
> A link to the specification(s) in the commit message would be nice to have

I admit it is probably a seperate change...

> > -	if (!timeout) {
> > -		dev_err(i2c_dev->dev, "Write to slave 0x%x timed out\n",
> > -				c->addr);

... motivated by this "if (!timeout) dev_err("timeout!")" which is super
confusing to read because the logic is paradox.


> > +	if (!time_left)
> >  		ret = -ETIMEDOUT;
> > -	}
> 
> Why did we lost the dev_err() here?

Agreed. Another seperate change. A timeout is not something the user
need to be aware of. It can regularly happen while an EEPROM is erasing
a page. The client driver will probably handle it correctly by trying
again. Only if the client driver sees a problem, then the user should be
notified. But not in the controller driver.

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux