From 091b76d6aa788d8294caa2895cea1013f3eff7da Mon Sep 17 00:00:00 2001 From: Greg Ungerer Date: Thu, 14 Feb 2008 19:31:25 -0800 Subject: [PATCH] m68knommu: avoid unneccessary use of xchg() in set_mb() Avoid unneccessary use of xchg() in set_mb(). Signed-off-by: Greg Ungerer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/asm-m68knommu/system.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/asm-m68knommu/system.h b/include/asm-m68knommu/system.h index 039ab3f817..64c64432bb 100644 --- a/include/asm-m68knommu/system.h +++ b/include/asm-m68knommu/system.h @@ -104,7 +104,7 @@ asmlinkage void resume(void); #define mb() asm volatile ("" : : :"memory") #define rmb() asm volatile ("" : : :"memory") #define wmb() asm volatile ("" : : :"memory") -#define set_mb(var, value) do { xchg(&var, value); } while (0) +#define set_mb(var, value) ({ (var) = (value); wmb(); }) #ifdef CONFIG_SMP #define smp_mb() mb() -- 2.39.5