Subject: [PATCH v2 2/2] ARM: include: asm: use 'int' instead of 'unsigned long' for 'oldval' in atomic_cmpxchg().

From: [email-masked] (Chen Gang)
Date: Tue, 08 Oct 2013 18:59:15 +0800

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).

Signed-off-by: Chen Gang <[email-masked]>
---
 arch/arm/include/asm/atomic.h |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/arch/arm/include/asm/atomic.h b/arch/arm/include/asm/atomic.h
index a715ac0..9ee7e01 100644
--- a/arch/arm/include/asm/atomic.h
+++ b/arch/arm/include/asm/atomic.h
@@ -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();
 
-- 
1.7.7.6