aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChen Gang <gang.chen@asianux.com>2013-10-26 15:07:25 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-02-05 22:35:38 -0800
commit200d9918496952207f3f26f432368b208d984936 (patch)
treed79946c3531ba5b18f0b10b246dca73efd255362
parent4db1ea4eb527d38ea61b449474a79438c6a8af93 (diff)
downloadlinux-linaro-stable-200d9918496952207f3f26f432368b208d984936.tar.gz
ARM: 7867/1: include: asm: use 'int' instead of 'unsigned long' for 'oldval' in atomic_cmpxchg().
commit 4dcc1cf7316a26e112f5c9fcca531ff98ef44700 upstream. 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> Cc: Hou Pengyang <houpengyang@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--arch/arm/include/asm/atomic.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm/include/asm/atomic.h b/arch/arm/include/asm/atomic.h
index a715ac049e4c..9ee7e01066f9 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();