Commit b11fa580ac06b34944a2b46a44ebce2c284e1a76
Committed by
Paul Mackerras
1 parent
144b9c135b
Exists in
master
and in
7 other branches
[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>
Showing 1 changed file with 13 additions and 13 deletions Side-by-side Diff
include/asm-powerpc/atomic.h
... | ... | @@ -176,19 +176,19 @@ |
176 | 176 | * Atomically adds @a to @v, so long as it was not @u. |
177 | 177 | * Returns non-zero if @v was not @u, and zero otherwise. |
178 | 178 | */ |
179 | -#define atomic_add_unless(v, a, u) \ | |
180 | -({ \ | |
181 | - int c, old; \ | |
182 | - c = atomic_read(v); \ | |
183 | - for (;;) { \ | |
184 | - if (unlikely(c == (u))) \ | |
185 | - break; \ | |
186 | - old = atomic_cmpxchg((v), c, c + (a)); \ | |
187 | - if (likely(old == c)) \ | |
188 | - break; \ | |
189 | - c = old; \ | |
190 | - } \ | |
191 | - c != (u); \ | |
179 | +#define atomic_add_unless(v, a, u) \ | |
180 | +({ \ | |
181 | + int c, old; \ | |
182 | + c = atomic_read(v); \ | |
183 | + for (;;) { \ | |
184 | + if (unlikely(c == (u))) \ | |
185 | + break; \ | |
186 | + old = atomic_cmpxchg((v), c, c + (a)); \ | |
187 | + if (likely(old == c)) \ | |
188 | + break; \ | |
189 | + c = old; \ | |
190 | + } \ | |
191 | + c != (u); \ | |
192 | 192 | }) |
193 | 193 | #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) |
194 | 194 |