From: Dmitry Ilvokhin Date: Tue, 2 Jun 2026 07:12:51 +0000 (+0000) Subject: genirq: Move NULL check into irqdesc_lock guard unlock expression X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=08d4a7837f008ea6031c1292aa839ad881d7b3f1;p=thirdparty%2Fkernel%2Flinux.git genirq: Move NULL check into irqdesc_lock guard unlock expression irqdesc_lock uses __DEFINE_UNLOCK_GUARD() directly with a custom constructor that can set .lock to NULL. In preparation for removing the NULL check from __DEFINE_UNLOCK_GUARD(), move the NULL check into the irqdesc_lock unlock expression, making the NULL handling explicit at the call site. No functional change. Signed-off-by: Dmitry Ilvokhin Signed-off-by: Peter Zijlstra (Intel) Acked-by: Thomas Gleixner Link: https://patch.msgid.link/ab457810653e4356e29b2d74ba616478bd9328ad.1780064327.git.d@ilvokhin.com --- diff --git a/kernel/irq/internals.h b/kernel/irq/internals.h index 9412e57056f5c..347cb333b9fea 100644 --- a/kernel/irq/internals.h +++ b/kernel/irq/internals.h @@ -171,7 +171,7 @@ void __irq_put_desc_unlock(struct irq_desc *desc, unsigned long flags, bool bus) __DEFINE_CLASS_IS_CONDITIONAL(irqdesc_lock, true); __DEFINE_UNLOCK_GUARD(irqdesc_lock, struct irq_desc, - __irq_put_desc_unlock(_T->lock, _T->flags, _T->bus), + if (_T->lock) __irq_put_desc_unlock(_T->lock, _T->flags, _T->bus), unsigned long flags; bool bus); static inline class_irqdesc_lock_t class_irqdesc_lock_constructor(unsigned int irq, bool bus,