[<prev] [next>] [day] [month] [year] [list]
Message-ID: <174663066368.406.8468526909340567854.tip-bot2@tip-bot2>
Date: Wed, 07 May 2025 15:11:03 -0000
From: "tip-bot2 for Thomas Gleixner" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: kernel test robot <lkp@...el.com>, Thomas Gleixner <tglx@...utronix.de>,
x86@...nel.org, linux-kernel@...r.kernel.org, maz@...nel.org
Subject: [tip: irq/core] genirq: Use scoped_guard() to shut clang up
The following commit has been merged into the irq/core branch of tip:
Commit-ID: 97f4b999e0c894d3e48e318aa1130132031815b3
Gitweb: https://git.kernel.org/tip/97f4b999e0c894d3e48e318aa1130132031815b3
Author: Thomas Gleixner <tglx@...utronix.de>
AuthorDate: Wed, 07 May 2025 15:47:06 +02:00
Committer: Thomas Gleixner <tglx@...utronix.de>
CommitterDate: Wed, 07 May 2025 17:08:44 +02:00
genirq: Use scoped_guard() to shut clang up
This code pattern trips clang up:
if (fail)
goto undo;
guard(lock)(lock);
do_stuff();
return 0;
undo:
...
as it somehow extends the scope of the guard beyond the return statement.
Replace it with a scoped guard to help it to get its act together.
Reported-by: kernel test robot <lkp@...el.com>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Closes: https://lore.kernel.org/oe-kbuild-all/202505071809.ajpPxfoZ-lkp@intel.com/
---
kernel/irq/manage.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index e6c6c0a..2861e11 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -2564,8 +2564,8 @@ int request_percpu_nmi(unsigned int irq, irq_handler_t handler,
if (retval)
goto err_irq_setup;
- guard(raw_spinlock_irqsave)(&desc->lock);
- desc->istate |= IRQS_NMI;
+ scoped_guard(raw_spinlock_irqsave, &desc->lock)
+ desc->istate |= IRQS_NMI;
return 0;
err_irq_setup:
Powered by blists - more mailing lists