Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

locking: remove unused double_spin_lock()

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>

authored by

Oleg Nesterov and committed by
Thomas Gleixner
3f3eafc9 8e60e05f

-37
-37
include/linux/spinlock.h
··· 296 296 }) 297 297 298 298 /* 299 - * Locks two spinlocks l1 and l2. 300 - * l1_first indicates if spinlock l1 should be taken first. 301 - */ 302 - static inline void double_spin_lock(spinlock_t *l1, spinlock_t *l2, 303 - bool l1_first) 304 - __acquires(l1) 305 - __acquires(l2) 306 - { 307 - if (l1_first) { 308 - spin_lock(l1); 309 - spin_lock(l2); 310 - } else { 311 - spin_lock(l2); 312 - spin_lock(l1); 313 - } 314 - } 315 - 316 - /* 317 - * Unlocks two spinlocks l1 and l2. 318 - * l1_taken_first indicates if spinlock l1 was taken first and therefore 319 - * should be released after spinlock l2. 320 - */ 321 - static inline void double_spin_unlock(spinlock_t *l1, spinlock_t *l2, 322 - bool l1_taken_first) 323 - __releases(l1) 324 - __releases(l2) 325 - { 326 - if (l1_taken_first) { 327 - spin_unlock(l2); 328 - spin_unlock(l1); 329 - } else { 330 - spin_unlock(l1); 331 - spin_unlock(l2); 332 - } 333 - } 334 - 335 - /* 336 299 * Pull the atomic_t declaration: 337 300 * (asm-mips/atomic.h needs above definitions) 338 301 */