]> Pileus Git - ~andy/linux/commitdiff
ARM: 7867/1: include: asm: use 'int' instead of 'unsigned long' for 'oldval' in atomi...
authorChen Gang <gang.chen@asianux.com>
Sat, 26 Oct 2013 14:07:25 +0000 (15:07 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Sat, 9 Nov 2013 00:00:12 +0000 (00:00 +0000)
For atomic_cmpxchg(), the type of 'oldval' need be 'int' to match the
type of "*ptr" (used by 'ldrex' instruction) and 'old' (used by 'teq'
instruction).

Reviewed-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Chen Gang <gang.chen@asianux.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/include/asm/atomic.h

index a715ac049e4cb862b0f68f06b773e4ab80089db6..9ee7e01066f99088ed0e1d9943c25479e3d0f8d3 100644 (file)
@@ -114,7 +114,8 @@ static inline int atomic_sub_return(int i, atomic_t *v)
 
 static inline int atomic_cmpxchg(atomic_t *ptr, int old, int new)
 {
-       unsigned long oldval, res;
+       int oldval;
+       unsigned long res;
 
        smp_mb();