]> www.infradead.org Git - users/jedix/linux-maple.git/commit
locking/rt: Remove one __cond_lock() in RT's spin_trylock_irqsave()
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Mon, 12 Aug 2024 10:39:03 +0000 (12:39 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 24 Oct 2024 09:27:01 +0000 (11:27 +0200)
commitb1f01f9e54b1aaadb6740f86017e8fabdee77fe2
tree270ae9789677e389132de5f7e5d67eb6e34b8549
parent52e0874fc16bd26e9ea1871e30ffb2c6dff187cf
locking/rt: Remove one __cond_lock() in RT's spin_trylock_irqsave()

spin_trylock_irqsave() has a __cond_lock() wrapper which points to
__spin_trylock_irqsave(). The function then invokes spin_trylock() which
has another __cond_lock() finally pointing to rt_spin_trylock().

The compiler has no problem to parse this but sparse does not recognise
that users of spin_trylock_irqsave() acquire a conditional lock and
complains.

Remove one layer of __cond_lock() so that sparse recognises conditional
locking.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20240812104200.2239232-3-bigeasy@linutronix.de
include/linux/spinlock_rt.h