Re: [PATCH] i2c: (i2c-diolan-u2c) Fix master_xfer return code

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

 



On Mon, Aug 13, 2012 at 11:57:15AM +0530, Shubhrajyoti Datta wrote:
> On Fri, Aug 10, 2012 at 10:36 PM, Guenter Roeck <linux@xxxxxxxxxxxx> wrote:
> [...]
> >>
> >> However if only a few go through should we return the number of
> >> successful transactions
> >> instead of error?
> >>
> > Most other I2C bus drivers do the same, so I decided to not make the code
> > more complicated than necessary and do it the same way. Also, I prefer to have
> > the actual error code returned to the caller, not "I transferred x of your y
> > messages, but I won't tell you what went wrong with the rest".
> 
> depends on what the user decides however if ever his algo is that resend only
> the remaining it would never work. Anyways thats a different story.
> 
Worse, many callers don't check if the return code matches the number of
messages. So errors can get lost if the return code after an error is not
negative.

Guenter

> >
> > If that prevents it from getting integrated, I'll be happy to change it.
> 
> I have no objections to the patch getting integrated.
> Afterall anything that helps, helps:-)
> 
> 
> >
> > Thanks,
> > Guenter
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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