[PATCH 1/2] x86,smp: simplify __ticket_spin_lock

From: Michel Lespinasse
Date: Tue Jan 01 2013 - 19:09:26 EST


Just cosmetic - avoid an unnecessary goto construct

Signed-off-by: Michel Lespinasse <walken@xxxxxxxxxx>

---
arch/x86/include/asm/spinlock.h | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/arch/x86/include/asm/spinlock.h b/arch/x86/include/asm/spinlock.h
index 2a45eb0cdb2c..19e8a36b3b83 100644
--- a/arch/x86/include/asm/spinlock.h
+++ b/arch/x86/include/asm/spinlock.h
@@ -55,11 +55,8 @@ static __always_inline void __ticket_spin_lock(arch_spinlock_t *lock)

inc = xadd(&lock->tickets, inc);

- if (inc.head == inc.tail)
- goto out;
-
- ticket_spin_lock_wait(lock, inc);
- out:
+ if (inc.head != inc.tail)
+ ticket_spin_lock_wait(lock, inc);
barrier(); /* make sure nothing creeps before the lock is taken */
}

--
1.7.7.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/