From 19121aa7dfe734eb9a22daa8171159b26bc19469 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Fri, 28 Sep 2012 10:19:42 +1000 Subject: [PATCH] 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 --- arch/microblaze/include/asm/atomic.h | 4 ++-- arch/powerpc/include/asm/atomic.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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() -- 2.39.5