Messages in this thread Patch in this message | | | Date | Tue, 1 Jan 2013 16:09:35 -0800 | From | Michel Lespinasse <> | Subject | [PATCH 1/2] x86,smp: simplify __ticket_spin_lock |
| |
Just cosmetic - avoid an unnecessary goto construct
Signed-off-by: Michel Lespinasse <walken@google.com>
--- 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
| |