diff options
author | David S. Miller <davem@davemloft.net> | 2010-08-18 00:12:04 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-08-18 00:12:04 (GMT) |
commit | 86fa04b8742ac681d470786f55e2403ada0075b2 (patch) | |
tree | 956d792b6a5b8a5e19bceab8e971339eded60d54 /arch/sparc/include | |
parent | ef201bebe5afc91a2b99b45dacc8c6dd88ca9e58 (diff) | |
download | linux-86fa04b8742ac681d470786f55e2403ada0075b2.tar.xz |
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/sparc/include')
-rw-r--r-- | arch/sparc/include/asm/atomic_64.h | 6 |
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 2050ca0..f0c7422 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 *); extern void atomic64_sub(int, atomic64_t *); extern int atomic_add_ret(int, atomic_t *); -extern int atomic64_add_ret(int, atomic64_t *); +extern long atomic64_add_ret(int, atomic64_t *); extern int atomic_sub_ret(int, atomic_t *); -extern int atomic64_sub_ret(int, atomic64_t *); +extern long atomic64_sub_ret(int, atomic64_t *); #define atomic_dec_return(v) atomic_sub_ret(1, v) #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) ((__typeof__((v)->counter))cmpxchg(&((v)->counter), (o), (n))) #define atomic64_xchg(v, new) (xchg(&((v)->counter), new)) -static inline int atomic64_add_unless(atomic64_t *v, long a, long u) +static inline long atomic64_add_unless(atomic64_t *v, long a, long u) { long c, old; c = atomic64_read(v); |