]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
[ARM] 3311/1: clean up include/asm-arm/mutex.h
authorNicolas Pitre <nico@cam.org>
Wed, 8 Feb 2006 21:19:38 +0000 (21:19 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Wed, 8 Feb 2006 21:19:38 +0000 (21:19 +0000)
commit365bf8ac6f5b3d3187cb39444fa87a5b38683ff4
tree6b0e8234ca75d6b5b155c652028a0506875099a9
parent5964eae835c3b98c69d338950651f7f414f96477
[ARM] 3311/1: clean up include/asm-arm/mutex.h

Patch from Nicolas Pitre

Since:

if (unlikely(__res || __ex_flag))

produces worse code on ARM than:

if (unlikely(__res | __ex_flag))

I therefore made it more explicit:

__res |= __ex_flag;
if (unlikely(__res != 0))

so it is not seen as a typo again.

Also made everything static inline rather than macros for better readability
(both produce the same code after all).

And finally added missing \t from multi-line assembly code.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
include/asm-arm/mutex.h