]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob
ea43aa6ccf58f5e5bc43117e5c2e11d7504fa520
[thirdparty/kernel/stable-queue.git] /
1 From 4dcc1cf7316a26e112f5c9fcca531ff98ef44700 Mon Sep 17 00:00:00 2001
2 From: Chen Gang <gang.chen@asianux.com>
3 Date: Sat, 26 Oct 2013 15:07:25 +0100
4 Subject: ARM: 7867/1: include: asm: use 'int' instead of 'unsigned long' for 'oldval' in atomic_cmpxchg().
5
6 From: Chen Gang <gang.chen@asianux.com>
7
8 commit 4dcc1cf7316a26e112f5c9fcca531ff98ef44700 upstream.
9
10 For atomic_cmpxchg(), the type of 'oldval' need be 'int' to match the
11 type of "*ptr" (used by 'ldrex' instruction) and 'old' (used by 'teq'
12 instruction).
13
14 Reviewed-by: Will Deacon <will.deacon@arm.com>
15 Signed-off-by: Chen Gang <gang.chen@asianux.com>
16 Signed-off-by: Will Deacon <will.deacon@arm.com>
17 Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
18 Cc: Hou Pengyang <houpengyang@huawei.com>
19 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20
21 ---
22 arch/arm/include/asm/atomic.h | 3 ++-
23 1 file changed, 2 insertions(+), 1 deletion(-)
24
25 --- a/arch/arm/include/asm/atomic.h
26 +++ b/arch/arm/include/asm/atomic.h
27 @@ -114,7 +114,8 @@ static inline int atomic_sub_return(int
28
29 static inline int atomic_cmpxchg(atomic_t *ptr, int old, int new)
30 {
31 - unsigned long oldval, res;
32 + int oldval;
33 + unsigned long res;
34
35 smp_mb();
36