[PATCH] mmci: calculate remaining bytes at error correctly

Russell King - ARM Linux linux at arm.linux.org.uk
Tue Feb 1 18:40:11 EST 2011


On Mon, Jan 31, 2011 at 03:31:28PM +0300, Sergei Shtylyov wrote:
> Hello.
>
> On 31-01-2011 15:25, Russell King - ARM Linux wrote:
>> If you insist on putting parens around a&  b there, then for the sake of
>> consistency, you should be putting parens around every sub-expression
>> involving || and &&  - as if you think that a & b || c could be incorrectly
>> evaluated, a < b || c falls into exactly the same category, as does
>> a < b || c < d.
>
>    I mainly noted about those parens because gcc tends to give warnings 
> in such cases, if I remember right.

Not quite.  GCC warns for these:

	a || b && c
	a | b & c

as it seems much harder to remember the relative precedence of the OR
operators vs the AND operators in each class of logical vs bitwise
operators.



More information about the linux-arm-kernel mailing list