Skip to contentSkip to conversation

mei: vsc: Remove unused irq functions

PATCH In review [email protected] 4 participants 5 messages Jun 17, 2025 – Jun 24, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mei: vsc: Remove unused irq functions

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

vsc_tp_request_irq() and vsc_tp_free_irq() last uses were removed in 2024 by
commit 9b5e045029d8 ("mei: vsc: Don't stop/restart mei device during system suspend/resume")

Remove them.

---
 drivers/misc/mei/vsc-tp.c | 31 -------------------------------
 1 file changed, 31 deletions(-)
drivers/misc/mei/vsc-tp.c +0 -31
index 267d0de5fade..99a55451e1fc 100644
@@ -406,37 +406,6 @@ int vsc_tp_register_event_cb(struct vsc_tp *tp, vsc_tp_event_cb_t event_cb,
 }
 EXPORT_SYMBOL_NS_GPL(vsc_tp_register_event_cb, "VSC_TP");
 
-/**
- * vsc_tp_request_irq - request irq for vsc_tp device
- * @tp: vsc_tp device handle
- */
-int vsc_tp_request_irq(struct vsc_tp *tp)
-{
-	struct spi_device *spi = tp->spi;
-	struct device *dev = &spi->dev;
-	int ret;
-
-	irq_set_status_flags(spi->irq, IRQ_DISABLE_UNLAZY);
-	ret = request_threaded_irq(spi->irq, vsc_tp_isr, vsc_tp_thread_isr,
-				   IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
-				   dev_name(dev), tp);
-	if (ret)
-		return ret;
-
-	return 0;
-}
-EXPORT_SYMBOL_NS_GPL(vsc_tp_request_irq, "VSC_TP");
-
-/**
- * vsc_tp_free_irq - free irq for vsc_tp device
- * @tp: vsc_tp device handle
- */
-void vsc_tp_free_irq(struct vsc_tp *tp)
-{
-	free_irq(tp->spi->irq, tp);
-}
-EXPORT_SYMBOL_NS_GPL(vsc_tp_free_irq, "VSC_TP");
-
 /**
  * vsc_tp_intr_synchronize - synchronize vsc_tp interrupt
  * @tp: vsc_tp device handle
Signature · 1 line
2.49.0
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines

Subject: [PATCH] mei: vsc: Remove unused irq functions

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

Quoted 8 lines

vsc_tp_request_irq() and vsc_tp_free_irq() last uses were removed in 2024 by
commit 9b5e045029d8 ("mei: vsc: Don't stop/restart mei device during system
suspend/resume")

Remove them.

Quoted 50 lines
---
 drivers/misc/mei/vsc-tp.c | 31 -------------------------------
 1 file changed, 31 deletions(-)
drivers/misc/mei/vsc-tp.c +0 -31
index 267d0de5fade..99a55451e1fc 100644
@@ -406,37 +406,6 @@ int vsc_tp_register_event_cb(struct vsc_tp *tp,
 vsc_tp_event_cb_t event_cb,
 }
 EXPORT_SYMBOL_NS_GPL(vsc_tp_register_event_cb, "VSC_TP");
 
-/**
- * vsc_tp_request_irq - request irq for vsc_tp device
- * @tp: vsc_tp device handle
- */
-int vsc_tp_request_irq(struct vsc_tp *tp)
-{
-	struct spi_device *spi = tp->spi;
-	struct device *dev = &spi->dev;
-	int ret;
-
-	irq_set_status_flags(spi->irq, IRQ_DISABLE_UNLAZY);
-	ret = request_threaded_irq(spi->irq, vsc_tp_isr, vsc_tp_thread_isr,
-				   IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
-				   dev_name(dev), tp);
-	if (ret)
-		return ret;
-
-	return 0;
-}
-EXPORT_SYMBOL_NS_GPL(vsc_tp_request_irq, "VSC_TP");
-
-/**
- * vsc_tp_free_irq - free irq for vsc_tp device
- * @tp: vsc_tp device handle
- */
-void vsc_tp_free_irq(struct vsc_tp *tp)
-{
-	free_irq(tp->spi->irq, tp);
-}
-EXPORT_SYMBOL_NS_GPL(vsc_tp_free_irq, "VSC_TP");
-
 /**
  * vsc_tp_intr_synchronize - synchronize vsc_tp interrupt

* @tp: vsc_tp device handle
--
2.49.0

#2 lore raw
In reply to [email protected]

Hi David,

Quoted 10 lines · On 17-Jun-25 2:34 AM, [email protected] wrote:

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

vsc_tp_request_irq() and vsc_tp_free_irq() last uses were removed in 2024 by
commit 9b5e045029d8 ("mei: vsc: Don't stop/restart mei device during system suspend/resume")

Remove them.

Alexander pointed me at this patch because I just posted almost the same patch:

https://lore.kernel.org/lkml/[email protected]/

Normally I would say lets go with your (David's) version since you posted your patch first.

But your patch is missing the removal of the function prototypes from vsc-tp.h, so in this case I think we should go with my version.

Regards,

Hans

Quoted 46 lines
---
 drivers/misc/mei/vsc-tp.c | 31 -------------------------------
 1 file changed, 31 deletions(-)
drivers/misc/mei/vsc-tp.c +0 -31
index 267d0de5fade..99a55451e1fc 100644
@@ -406,37 +406,6 @@ int vsc_tp_register_event_cb(struct vsc_tp *tp, vsc_tp_event_cb_t event_cb,
 }
 EXPORT_SYMBOL_NS_GPL(vsc_tp_register_event_cb, "VSC_TP");
 
-/**
- * vsc_tp_request_irq - request irq for vsc_tp device
- * @tp: vsc_tp device handle
- */
-int vsc_tp_request_irq(struct vsc_tp *tp)
-{
-	struct spi_device *spi = tp->spi;
-	struct device *dev = &spi->dev;
-	int ret;
-
-	irq_set_status_flags(spi->irq, IRQ_DISABLE_UNLAZY);
-	ret = request_threaded_irq(spi->irq, vsc_tp_isr, vsc_tp_thread_isr,
-				   IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
-				   dev_name(dev), tp);
-	if (ret)
-		return ret;
-
-	return 0;
-}
-EXPORT_SYMBOL_NS_GPL(vsc_tp_request_irq, "VSC_TP");
-
-/**
- * vsc_tp_free_irq - free irq for vsc_tp device
- * @tp: vsc_tp device handle
- */
-void vsc_tp_free_irq(struct vsc_tp *tp)
-{
-	free_irq(tp->spi->irq, tp);
-}
-EXPORT_SYMBOL_NS_GPL(vsc_tp_free_irq, "VSC_TP");
-
 /**
  * vsc_tp_intr_synchronize - synchronize vsc_tp interrupt
  * @tp: vsc_tp device handle
#3 lore raw
Quoted 17 lines · * Hans de Goede ([email protected]) wrote:

Hi David,

Quoted 10 lines · On 17-Jun-25 2:34 AM, [email protected] wrote:

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

vsc_tp_request_irq() and vsc_tp_free_irq() last uses were removed in 2024 by
commit 9b5e045029d8 ("mei: vsc: Don't stop/restart mei device during system suspend/resume")

Remove them.

Alexander pointed me at this patch because I just posted almost the same patch:

Quoted 7 lines

https://lore.kernel.org/lkml/[email protected]/

Normally I would say lets go with your (David's) version since you posted your patch first.

But your patch is missing the removal of the function prototypes from vsc-tp.h, so in this case I think we should go with my version.

Oops, yep that makes sense to me.

Thanks,

Dave

Quoted 53 lines

Regards,

Hans

Quoted 46 lines
---
 drivers/misc/mei/vsc-tp.c | 31 -------------------------------
 1 file changed, 31 deletions(-)
drivers/misc/mei/vsc-tp.c +0 -31
index 267d0de5fade..99a55451e1fc 100644
@@ -406,37 +406,6 @@ int vsc_tp_register_event_cb(struct vsc_tp *tp, vsc_tp_event_cb_t event_cb,
 }
 EXPORT_SYMBOL_NS_GPL(vsc_tp_register_event_cb, "VSC_TP");
 
-/**
- * vsc_tp_request_irq - request irq for vsc_tp device
- * @tp: vsc_tp device handle
- */
-int vsc_tp_request_irq(struct vsc_tp *tp)
-{
-	struct spi_device *spi = tp->spi;
-	struct device *dev = &spi->dev;
-	int ret;
-
-	irq_set_status_flags(spi->irq, IRQ_DISABLE_UNLAZY);
-	ret = request_threaded_irq(spi->irq, vsc_tp_isr, vsc_tp_thread_isr,
-				   IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
-				   dev_name(dev), tp);
-	if (ret)
-		return ret;
-
-	return 0;
-}
-EXPORT_SYMBOL_NS_GPL(vsc_tp_request_irq, "VSC_TP");
-
-/**
- * vsc_tp_free_irq - free irq for vsc_tp device
- * @tp: vsc_tp device handle
- */
-void vsc_tp_free_irq(struct vsc_tp *tp)
-{
-	free_irq(tp->spi->irq, tp);
-}
-EXPORT_SYMBOL_NS_GPL(vsc_tp_free_irq, "VSC_TP");
-
 /**
  * vsc_tp_intr_synchronize - synchronize vsc_tp interrupt
  * @tp: vsc_tp device handle
Signature · 4 lines
 -----Open up your eyes, open up your mind, open up your code -------   
/ Dr. David Alan Gilbert    |       Running GNU/Linux       | Happy  \ 
\        dave @ treblig.org |                               | In Hex /
 \ _________________________|_____ http://www.treblig.org   |_______/
maintainer
#4 lore raw
Quoted 20 lines · Dr. David Alan Gilbert
Quoted 19 lines · * Hans de Goede ([email protected]) wrote:

Hi David,

Quoted 10 lines · On 17-Jun-25 2:34 AM, [email protected] wrote:

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

vsc_tp_request_irq() and vsc_tp_free_irq() last uses were removed in 2024 by
commit 9b5e045029d8 ("mei: vsc: Don't stop/restart mei device during system suspend/resume")

Remove them.

Alexander pointed me at this patch because I just posted almost the same patch:

https://lore.kernel.org/lkml/[email protected]/

Quoted 7 lines
Quoted 5 lines

Normally I would say lets go with your (David's) version since you posted your patch first.

But your patch is missing the removal of the function prototypes from vsc-tp.h, so in this case I think we should go with my version.

Oops, yep that makes sense to me.

Ok, I'll go take your series now, sorry for the delay.

greg k-h