[tip: irq/core] genirq/debugfs: Convert to lock guards

tip-bot2 for Thomas Gleixner
2025-05-07T09:07:44Z

The following commit has been merged into the irq/core branch of tip:

Commit-ID: ecb84a3e7e7cccd7578d8b4c57035e98cd89901f
Gitweb: https://git.kernel.org/tip/ecb84a3e7e7cccd7578d8b4c57035e98cd89901f
Author: Thomas Gleixner <tglx@linutronix.de>
AuthorDate: Tue, 29 Apr 2025 08:55:02 +02:00
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Wed, 07 May 2025 09:08:12 +02:00

genirq/debugfs: Convert to lock guards

Convert all lock/unlock pairs to guards and tidy up the code.

No functional change.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/all/20250429065420.620200108@linutronix.de

---
kernel/irq/debugfs.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/kernel/irq/debugfs.c b/kernel/irq/debugfs.c
index ca142b9..9004a17 100644
--- a/kernel/irq/debugfs.c
+++ b/kernel/irq/debugfs.c
@@ -160,7 +160,7 @@ static int irq_debug_show(struct seq_file *m, void *p)
struct irq_desc *desc = m->private;
struct irq_data *data;

- raw_spin_lock_irq(&desc->lock);
+ guard(raw_spinlock_irq)(&desc->lock);
data = irq_desc_get_irq_data(desc);
seq_printf(m, "handler: %ps\n", desc->handle_irq);
seq_printf(m, "device: %s\n", desc->dev_name);
@@ -178,7 +178,6 @@ static int irq_debug_show(struct seq_file *m, void *p)
seq_printf(m, "node: %d\n", irq_data_get_node(data));
irq_debug_show_masks(m, desc);
irq_debug_show_data(m, data, 0);
- raw_spin_unlock_irq(&desc->lock);
return 0;
}