atomic-powerpc-remove-double-defines
PATCH 1/1 atomic-powerpc-remove-double-defines
Remove duplicated defines in asm-powerpc/atomic.h. atomic64_inc_not_zero and atomic64_xchg are defined twice. It also removes an unnecessary cast to the atomic_cmpxchg result, which is already done by system.h cmpxchg.
It applies on 2.6.21-rc6-mm1.
Signed-off-by Mathieu Desnoyers <[email protected]>
include/asm-powerpc/atomic.h +2 -8
@@ -166,8 +166,7 @@ static __inline__ int atomic_dec_return(atomic_t *v)return t; } -#define atomic_cmpxchg (v, o, n) \ - ((__typeof__((v)->counter))cmpxchg(&((v)->counter), (o), (n))) +#define atomic_cmpxchg (v, o, n) (cmpxchg(&((v)->counter), (o), (n)))#define atomic_xchg (v, new) (xchg(&((v)->counter), new))/**
@@ -415,12 +414,7 @@ static __inline__ long atomic64_dec_if_positive(atomic64_t *v)return t; } -#define atomic64_cmpxchg (v, o, n) \ - ((__typeof__((v)->counter))cmpxchg(&((v)->counter), (o), (n))) -#define atomic64_xchg (v, new) (xchg(&((v)->counter), new)) - -#define atomic64_inc_not_zero (v) atomic64_add_unless((v), 1, 0) - +#define atomic64_cmpxchg (v, o, n) (cmpxchg(&((v)->counter), (o), (n)))#define atomic64_xchg (v, new) (xchg(&((v)->counter), new))/**
Signature · 3 lines
Mathieu Desnoyers Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68