From: Andrew Morton Date: Fri, 28 Sep 2012 00:19:42 +0000 (+1000) Subject: atomic-implement-generic-atomic_dec_if_positive-fix X-Git-Tag: next-20121003~1^2~255 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=1cacf817d561cf801a3e4937fe77e5a3636843d7;p=karo-tx-linux.git atomic-implement-generic-atomic_dec_if_positive-fix do the "#define foo foo" trick in the conventional manner Cc: "David S. Miller" Cc: "H. Peter Anvin" Cc: Benjamin Herrenschmidt Cc: Ingo Molnar Cc: Michal Simek Cc: Rik van Riel Cc: Shaohua Li Cc: Shaohua Li Cc: Stephen Rothwell Cc: Thomas Gleixner Signed-off-by: Andrew Morton --- diff --git a/arch/microblaze/include/asm/atomic.h b/arch/microblaze/include/asm/atomic.h index d31a413ad0f0..42ac382a09da 100644 --- a/arch/microblaze/include/asm/atomic.h +++ b/arch/microblaze/include/asm/atomic.h @@ -9,7 +9,7 @@ * Atomically test *v and decrement if it is greater than 0. * The function returns the old value of *v minus 1. */ -static inline int __atomic_dec_if_positive(atomic_t *v) +static inline int atomic_dec_if_positive(atomic_t *v) { unsigned long flags; int res; @@ -22,6 +22,6 @@ static inline int __atomic_dec_if_positive(atomic_t *v) return res; } -#define atomic_dec_if_positive __atomic_dec_if_positive +#define atomic_dec_if_positive atomic_dec_if_positive #endif /* _ASM_MICROBLAZE_ATOMIC_H */ diff --git a/arch/powerpc/include/asm/atomic.h b/arch/powerpc/include/asm/atomic.h index d34ecbe5097b..e3b1d41c89be 100644 --- a/arch/powerpc/include/asm/atomic.h +++ b/arch/powerpc/include/asm/atomic.h @@ -247,7 +247,7 @@ static __inline__ int atomic_inc_not_zero(atomic_t *v) * The function returns the old value of *v minus 1, even if * the atomic variable, v, was not decremented. */ -static __inline__ int __atomic_dec_if_positive(atomic_t *v) +static __inline__ int atomic_dec_if_positive(atomic_t *v) { int t; @@ -268,7 +268,7 @@ static __inline__ int __atomic_dec_if_positive(atomic_t *v) return t; } -#define atomic_dec_if_positive __atomic_dec_if_positive +#define atomic_dec_if_positive atomic_dec_if_positive #define smp_mb__before_atomic_dec() smp_mb() #define smp_mb__after_atomic_dec() smp_mb()