Skip to content

Commit

Permalink
sparc64: Fix atomic64_t routine return values.
Browse files Browse the repository at this point in the history
Should return 'long' instead of 'int'.

Thanks to Dimitris Michailidis and Tony Luck.

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Aug 18, 2010
1 parent ef201be commit 86fa04b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions arch/sparc/include/asm/atomic_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 86fa04b

Please sign in to comment.