Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

[ARM] 5067/1: _raw_write_can_lock macro bugfix

The current __raw_write_can_lock macro tests whether the lock can be
locked by checking if it is equal to 0x80000000, whereas the lock
should be lockable if its value is 0 i.e. unlocked state is
represented by 0. Hence the macro should test the value of lock
against 0 and not 0x80000000.

Signed-off-by: Surinder Pal Singh <srplsnh@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

authored by

surinder and committed by
Russell King
1e5c5946 ea6a7404

+1 -1
+1 -1
include/asm-arm/spinlock.h
··· 142 142 } 143 143 144 144 /* write_can_lock - would write_trylock() succeed? */ 145 - #define __raw_write_can_lock(x) ((x)->lock == 0x80000000) 145 + #define __raw_write_can_lock(x) ((x)->lock == 0) 146 146 147 147 /* 148 148 * Read locks are a bit more hairy: