Skip to content

Commit 8e3f672

Browse files
committed
genirq/manage: Rework disable_percpu_irq()
Use the new guards to get and lock the interrupt descriptor and tidy up the code. No functional change. Signed-off-by: Thomas Gleixner <[email protected]> Acked-by: Peter Zijlstra (Intel) <[email protected]> Link: https://lore.kernel.org/all/[email protected]
1 parent b171f71 commit 8e3f672

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

kernel/irq/manage.c

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2330,15 +2330,8 @@ EXPORT_SYMBOL_GPL(irq_percpu_is_enabled);
23302330

23312331
void disable_percpu_irq(unsigned int irq)
23322332
{
2333-
unsigned int cpu = smp_processor_id();
2334-
unsigned long flags;
2335-
struct irq_desc *desc = irq_get_desc_lock(irq, &flags, IRQ_GET_DESC_CHECK_PERCPU);
2336-
2337-
if (!desc)
2338-
return;
2339-
2340-
irq_percpu_disable(desc, cpu);
2341-
irq_put_desc_unlock(desc, flags);
2333+
scoped_irqdesc_get_and_lock(irq, IRQ_GET_DESC_CHECK_PERCPU)
2334+
irq_percpu_disable(scoped_irqdesc, smp_processor_id());
23422335
}
23432336
EXPORT_SYMBOL_GPL(disable_percpu_irq);
23442337

0 commit comments

Comments
 (0)