Skip to content

Commit

Permalink
locking: remove unused double_spin_lock()
Browse files Browse the repository at this point in the history
double_spin_lock() has no callers, and it can't be used without additional
lockdep annotations, remove it.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
Oleg Nesterov authored and Thomas Gleixner committed Apr 17, 2008
1 parent 8e60e05 commit 3f3eafc
Showing 1 changed file with 0 additions and 37 deletions.
37 changes: 0 additions & 37 deletions include/linux/spinlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -295,43 +295,6 @@ do { \
1 : ({ local_irq_restore(flags); 0; }); \
})

/*
* Locks two spinlocks l1 and l2.
* l1_first indicates if spinlock l1 should be taken first.
*/
static inline void double_spin_lock(spinlock_t *l1, spinlock_t *l2,
bool l1_first)
__acquires(l1)
__acquires(l2)
{
if (l1_first) {
spin_lock(l1);
spin_lock(l2);
} else {
spin_lock(l2);
spin_lock(l1);
}
}

/*
* Unlocks two spinlocks l1 and l2.
* l1_taken_first indicates if spinlock l1 was taken first and therefore
* should be released after spinlock l2.
*/
static inline void double_spin_unlock(spinlock_t *l1, spinlock_t *l2,
bool l1_taken_first)
__releases(l1)
__releases(l2)
{
if (l1_taken_first) {
spin_unlock(l2);
spin_unlock(l1);
} else {
spin_unlock(l1);
spin_unlock(l2);
}
}

/*
* Pull the atomic_t declaration:
* (asm-mips/atomic.h needs above definitions)
Expand Down

0 comments on commit 3f3eafc

Please sign in to comment.