From 9ef308946fa8390136130a886b0d9a57867a747a Mon Sep 17 00:00:00 2001 From: Roman Zippel Date: Fri, 6 Oct 2006 00:43:56 -0700 Subject: [PATCH] m68k: small system.h cleanup avoid unnecessary xchg() use in set_mb() Signed-off-by: Roman Zippel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/asm-m68k/system.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include/asm-m68k') diff --git a/include/asm-m68k/system.h b/include/asm-m68k/system.h index 131a0cb0f49..243dd13e6bf 100644 --- a/include/asm-m68k/system.h +++ b/include/asm-m68k/system.h @@ -78,13 +78,13 @@ static inline int irqs_disabled(void) #define mb() barrier() #define rmb() barrier() #define wmb() barrier() -#define read_barrier_depends() do { } while(0) -#define set_mb(var, value) do { xchg(&var, value); } while (0) +#define read_barrier_depends() ((void)0) +#define set_mb(var, value) ({ (var) = (value); wmb(); }) #define smp_mb() barrier() #define smp_rmb() barrier() #define smp_wmb() barrier() -#define smp_read_barrier_depends() do { } while(0) +#define smp_read_barrier_depends() ((void)0) #define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) -- cgit v1.2.3-70-g09d2