[PATCH] powerpc: reformat atomic_add_unless
authorAnton Blanchard <anton@samba.org>
Fri, 13 Jan 2006 05:51:52 +0000 (16:51 +1100)
committerPaul Mackerras <paulus@samba.org>
Fri, 13 Jan 2006 10:18:54 +0000 (21:18 +1100)
It makes my eyes hurt.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
include/asm-powerpc/atomic.h

index 9ce51ba54c13e04155b43de33d849dabecf8e608..147a38dcc766ed20129a497080bbcb42cd1026b2 100644 (file)
@@ -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.
  * 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)