[i2c] [patch 2.6.23-rc6] i2c-algo-bit whitespace fixes (+ NAK/ARB comments)
khali at linux-fr.org
Fri Nov 9 22:25:29 CET 2007
On Tue, 6 Nov 2007 10:48:11 -0800, David Brownell wrote:
> On Wednesday 17 October 2007, Jean Delvare wrote:
> > Please send an updated patch and I'll apply it.
> Now that "checkpatch --file" exists, I ran that and fixed the
> issues it reported. Also I:
> - cleaned up the sendbytes() return path to distinguish NAK
> from other cases ... which today are only timeouts (errors)
> but someday should include lost arbitration (not errors).
> - fixed the bug where EFAULT was wrongly returned for NAK
> errors; it's not a bad user address.
> Plus addressing your feedback.
> - Dave
Thanks for the update.
> ======= CUT HERE
> Fix *LOTS* of whitespace goofs and checkpatch.pl warnings, strangely
> parenthesized ternary expressions, and other CodingStyle glitches.
I've split the patch in two, first one with the whitespace cleanups...
> Update comments and logging on return path for byte writes. NAK is
> an error, to be reported or optionally ignored. Timeouts are always
> errors. Lost arbitration is not currently handled, so don't even list
> it as an option in the error message.
> Don't return bogus EFAULT code for inappropriate NAK; EIO is better,
> there is no bad userspace address in question.
...second one with this change. It's not a big change, but it _is_ a
code change, compared to all the rest which is only formatting changes.
You never know what impact a code change can have, so I prefer to have
it in a separate patch. It's cleaner that way anyway.
You can see the exact patches I took in my tree here:
More information about the i2c