[PATCH] powerpc: reformat atomic_add_unless

Anton Blanchard anton at samba.org
Fri Jan 13 16:51:52 EST 2006


> Much better, but that crazy double-tab-plus-a-few-spaces indentation
> itches a bit too. :-)

Yuck, didnt notice that when I scanned through it.

Anton
--

It makes my eyes hurt.

Signed-off-by: Anton Blanchard <anton at samba.org>
---

Index: build/include/asm-powerpc/atomic.h
===================================================================
--- build.orig/include/asm-powerpc/atomic.h	2006-01-13 15:09:49.000000000 +1100
+++ build/include/asm-powerpc/atomic.h	2006-01-13 16:47:06.000000000 +1100
@@ -176,19 +176,19 @@ static __inline__ int atomic_dec_return(
  * Atomically adds @a to @v, so long as it was not @u.
  * 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)
 



More information about the Linuxppc64-dev mailing list