Skip to contentSkip to conversation

genirq: Remove unused remove_percpu_irq

PATCH Applied [email protected] 2 participants 2 messages Apr 20, 2025 – May 7, 2025 IRQ

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 genirq: Remove unused remove_percpu_irq

From: "Dr. David Alan Gilbert" <[email protected]>

remove_percpu_irq() has been unused since it was added in 2011 by commit 31d9d9b6d830 ("genirq: Add support for per-cpu dev_id interrupts")

Remove it.
(I see Pingfan Liu tried to remove it as part of a series exactly 3 years ago, but don't see anything about why it didn't happen).

---
 include/linux/irq.h |  1 -
 kernel/irq/manage.c | 15 ---------------
 2 files changed, 16 deletions(-)
include/linux/irq.h +0 -1
index dd5df1e2d032..d8554da1b226 100644
@@ -597,7 +597,6 @@ enum {
 
 struct irqaction;
 extern int setup_percpu_irq(unsigned int irq, struct irqaction *new);
-extern void remove_percpu_irq(unsigned int irq, struct irqaction *act);
 
 #ifdef CONFIG_DEPRECATED_IRQ_CPU_ONOFFLINE
 extern void irq_cpu_online(void);
kernel/irq/manage.c +0 -15
index 753eef8e041c..30652434724d 100644
@@ -2497,21 +2497,6 @@ static struct irqaction *__free_percpu_irq(unsigned int irq, void __percpu *dev_
 	return NULL;
 }
 
-/**
- *	remove_percpu_irq - free a per-cpu interrupt
- *	@irq: Interrupt line to free
- *	@act: irqaction for the interrupt
- *
- * Used to remove interrupts statically setup by the early boot process.
- */
-void remove_percpu_irq(unsigned int irq, struct irqaction *act)
-{
-	struct irq_desc *desc = irq_to_desc(irq);
-
-	if (desc && irq_settings_is_per_cpu_devid(desc))
-	    __free_percpu_irq(irq, act->percpu_dev_id);
-}
-
 /**
  *	free_percpu_irq - free an interrupt allocated with request_percpu_irq
  *	@irq: Interrupt line to free
Signature · 1 line
2.49.0
#1 lore raw

[tip: irq/core] genirq: Remove unused remove_percpu_irq()

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

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

Commit-ID:     aefc11550ebd08eadee6d643792c9092de2e472f
Gitweb:        https://git.kernel.org/tip/aefc11550ebd08eadee6d643792c9092de2e472f
Author:        Dr. David Alan Gilbert <[email protected]>
AuthorDate:    Sun, 20 Apr 2025 17:46:56 +01:00
Committer:     Thomas Gleixner <[email protected]>
CommitterDate: Wed, 07 May 2025 11:35:41 +02:00

genirq: Remove unused remove_percpu_irq()

remove_percpu_irq() has been unused since it was added in 2011 by commit 31d9d9b6d830 ("genirq: Add support for per-cpu dev_id interrupts")

Remove it.

---
 include/linux/irq.h |  1 -
 kernel/irq/manage.c | 15 ---------------
 2 files changed, 16 deletions(-)
include/linux/irq.h +0 -1
index df93b23..810e44e 100644
@@ -597,7 +597,6 @@ enum {
 
 struct irqaction;
 extern int setup_percpu_irq(unsigned int irq, struct irqaction *new);
-extern void remove_percpu_irq(unsigned int irq, struct irqaction *act);
 
 #ifdef CONFIG_DEPRECATED_IRQ_CPU_ONOFFLINE
 extern void irq_cpu_online(void);
kernel/irq/manage.c +0 -15
index 827edc8..e6c6c0a 100644
@@ -2378,21 +2378,6 @@ static struct irqaction *__free_percpu_irq(unsigned int irq, void __percpu *dev_
 }
 
 /**
- * remove_percpu_irq - free a per-cpu interrupt
- * @irq:	Interrupt line to free
- * @act:	irqaction for the interrupt
- *
- * Used to remove interrupts statically setup by the early boot process.
- */
-void remove_percpu_irq(unsigned int irq, struct irqaction *act)
-{
-	struct irq_desc *desc = irq_to_desc(irq);
-
-	if (desc && irq_settings_is_per_cpu_devid(desc))
-		__free_percpu_irq(irq, act->percpu_dev_id);
-}
-
-/**
  * free_percpu_irq - free an interrupt allocated with request_percpu_irq
  * @irq:	Interrupt line to free
  * @dev_id:	Device identity to free