aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-08-17 20:12:04 -0400
committerDavid S. Miller <davem@davemloft.net>2010-08-17 20:12:04 -0400
commit86fa04b8742ac681d470786f55e2403ada0075b2 (patch)
tree956d792b6a5b8a5e19bceab8e971339eded60d54 /arch
parentef201bebe5afc91a2b99b45dacc8c6dd88ca9e58 (diff)
sparc64: Fix atomic64_t routine return values.
Should return 'long' instead of 'int'. Thanks to Dimitris Michailidis and Tony Luck. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch')
-rw-r--r--arch/sparc/include/asm/atomic_64.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/sparc/include/asm/atomic_64.h b/arch/sparc/include/asm/atomic_64.h
index 2050ca02c423..f0c74227c737 100644
--- a/arch/sparc/include/asm/atomic_64.h
+++ b/arch/sparc/include/asm/atomic_64.h
@@ -25,9 +25,9 @@ extern void atomic_sub(int, atomic_t *);
25extern void atomic64_sub(int, atomic64_t *); 25extern void atomic64_sub(int, atomic64_t *);
26 26
27extern int atomic_add_ret(int, atomic_t *); 27extern int atomic_add_ret(int, atomic_t *);
28extern int atomic64_add_ret(int, atomic64_t *); 28extern long atomic64_add_ret(int, atomic64_t *);
29extern int atomic_sub_ret(int, atomic_t *); 29extern int atomic_sub_ret(int, atomic_t *);
30extern int atomic64_sub_ret(int, atomic64_t *); 30extern long atomic64_sub_ret(int, atomic64_t *);
31 31
32#define atomic_dec_return(v) atomic_sub_ret(1, v) 32#define atomic_dec_return(v) atomic_sub_ret(1, v)
33#define atomic64_dec_return(v) atomic64_sub_ret(1, v) 33#define atomic64_dec_return(v) atomic64_sub_ret(1, v)
@@ -91,7 +91,7 @@ static inline int atomic_add_unless(atomic_t *v, int a, int u)
91 ((__typeof__((v)->counter))cmpxchg(&((v)->counter), (o), (n))) 91 ((__typeof__((v)->counter))cmpxchg(&((v)->counter), (o), (n)))
92#define atomic64_xchg(v, new) (xchg(&((v)->counter), new)) 92#define atomic64_xchg(v, new) (xchg(&((v)->counter), new))
93 93
94static inline int atomic64_add_unless(atomic64_t *v, long a, long u) 94static inline long atomic64_add_unless(atomic64_t *v, long a, long u)
95{ 95{
96 long c, old; 96 long c, old;
97 c = atomic64_read(v); 97 c = atomic64_read(v);