浏览代码

[PATCH] powerpc: reformat atomic_add_unless

It makes my eyes hurt.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Anton Blanchard 19 年之前
父节点
当前提交
b11fa580ac
共有 1 个文件被更改,包括 13 次插入13 次删除
  1. 13 13
      include/asm-powerpc/atomic.h

+ 13 - 13
include/asm-powerpc/atomic.h

@@ -176,19 +176,19 @@ static __inline__ int atomic_dec_return(atomic_t *v)
  * Atomically adds @a to @v, so long as it was not @u.
  * Atomically adds @a to @v, so long as it was not @u.
  * Returns non-zero if @v was not @u, and zero otherwise.
  * Returns non-zero if @v was not @u, and zero otherwise.
  */
  */
-#define atomic_add_unless(v, a, u)							 \
-({															 \
-	   int c, old;											 \
-	   c = atomic_read(v);									 \
-	   for (;;) {											  \
-			   if (unlikely(c == (u)))						 \
-					   break;								  \
-			   old = atomic_cmpxchg((v), c, c + (a));		  \
-			   if (likely(old == c))						   \
-					   break;								  \
-			   c = old;										\
-	   }													   \
-	   c != (u);											   \
+#define atomic_add_unless(v, a, u)			\
+({							\
+	int c, old;					\
+	c = atomic_read(v);				\
+	for (;;) {					\
+		if (unlikely(c == (u)))			\
+			break;				\
+		old = atomic_cmpxchg((v), c, c + (a));	\
+		if (likely(old == c))			\
+			break;				\
+		c = old;				\
+	}						\
+	c != (u);					\
 })
 })
 #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0)
 #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0)