[PATCH 01/10] mei: vsc: Drop unused vsc_tp_request_irq() and vsc_tp_free_irq()

Hans de Goede posted 10 patches 3 months, 2 weeks ago
[PATCH 01/10] mei: vsc: Drop unused vsc_tp_request_irq() and vsc_tp_free_irq()
Posted by Hans de Goede 3 months, 2 weeks ago
Drop the unused vsc_tp_request_irq() and vsc_tp_free_irq() functions.

Signed-off-by: Hans de Goede <hansg@kernel.org>
---
 drivers/misc/mei/vsc-tp.c | 31 -------------------------------
 drivers/misc/mei/vsc-tp.h |  3 ---
 2 files changed, 34 deletions(-)

diff --git a/drivers/misc/mei/vsc-tp.c b/drivers/misc/mei/vsc-tp.c
index 267d0de5fade..99a55451e1fc 100644
--- a/drivers/misc/mei/vsc-tp.c
+++ b/drivers/misc/mei/vsc-tp.c
@@ -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
diff --git a/drivers/misc/mei/vsc-tp.h b/drivers/misc/mei/vsc-tp.h
index 14ca195cbddc..f9513ddc3e40 100644
--- a/drivers/misc/mei/vsc-tp.h
+++ b/drivers/misc/mei/vsc-tp.h
@@ -37,9 +37,6 @@ int vsc_tp_xfer(struct vsc_tp *tp, u8 cmd, const void *obuf, size_t olen,
 int vsc_tp_register_event_cb(struct vsc_tp *tp, vsc_tp_event_cb_t event_cb,
 			     void *context);
 
-int vsc_tp_request_irq(struct vsc_tp *tp);
-void vsc_tp_free_irq(struct vsc_tp *tp);
-
 void vsc_tp_intr_enable(struct vsc_tp *tp);
 void vsc_tp_intr_disable(struct vsc_tp *tp);
 void vsc_tp_intr_synchronize(struct vsc_tp *tp);
-- 
2.49.0
RE: [PATCH 01/10] mei: vsc: Drop unused vsc_tp_request_irq() and vsc_tp_free_irq()
Posted by Usyskin, Alexander 3 months, 2 weeks ago
> Subject: [PATCH 01/10] mei: vsc: Drop unused vsc_tp_request_irq() and
> vsc_tp_free_irq()
> 
> Drop the unused vsc_tp_request_irq() and vsc_tp_free_irq() functions.
> 

This is proposed in
https://lkml.org/lkml/2025/6/17/25 "[PATCH] mei: vsc: Remove unused irq functions"

But I haven't seen that Greg pulled patch in -next.

- - 
Thanks,
Sasha


> Signed-off-by: Hans de Goede <hansg@kernel.org>
> ---
>  drivers/misc/mei/vsc-tp.c | 31 -------------------------------
>  drivers/misc/mei/vsc-tp.h |  3 ---
>  2 files changed, 34 deletions(-)
> 
> diff --git a/drivers/misc/mei/vsc-tp.c b/drivers/misc/mei/vsc-tp.c
> index 267d0de5fade..99a55451e1fc 100644
> --- a/drivers/misc/mei/vsc-tp.c
> +++ b/drivers/misc/mei/vsc-tp.c
> @@ -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
> diff --git a/drivers/misc/mei/vsc-tp.h b/drivers/misc/mei/vsc-tp.h
> index 14ca195cbddc..f9513ddc3e40 100644
> --- a/drivers/misc/mei/vsc-tp.h
> +++ b/drivers/misc/mei/vsc-tp.h
> @@ -37,9 +37,6 @@ int vsc_tp_xfer(struct vsc_tp *tp, u8 cmd, const void
> *obuf, size_t olen,
>  int vsc_tp_register_event_cb(struct vsc_tp *tp, vsc_tp_event_cb_t event_cb,
>  			     void *context);
> 
> -int vsc_tp_request_irq(struct vsc_tp *tp);
> -void vsc_tp_free_irq(struct vsc_tp *tp);
> -
>  void vsc_tp_intr_enable(struct vsc_tp *tp);
>  void vsc_tp_intr_disable(struct vsc_tp *tp);
>  void vsc_tp_intr_synchronize(struct vsc_tp *tp);
> --
> 2.49.0

Re: [PATCH 01/10] mei: vsc: Drop unused vsc_tp_request_irq() and vsc_tp_free_irq()
Posted by Hans de Goede 3 months, 2 weeks ago
Hi,

On 24-Jun-25 8:06 AM, Usyskin, Alexander wrote:
>> Subject: [PATCH 01/10] mei: vsc: Drop unused vsc_tp_request_irq() and
>> vsc_tp_free_irq()
>>
>> Drop the unused vsc_tp_request_irq() and vsc_tp_free_irq() functions.
>>
> 
> This is proposed in
> https://lkml.org/lkml/2025/6/17/25 "[PATCH] mei: vsc: Remove unused irq functions"

Thank you for pointing that out.

Normally I would say lets go with David's version since that was
posted first.

But David's 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




>> Signed-off-by: Hans de Goede <hansg@kernel.org>
>> ---
>>  drivers/misc/mei/vsc-tp.c | 31 -------------------------------
>>  drivers/misc/mei/vsc-tp.h |  3 ---
>>  2 files changed, 34 deletions(-)
>>
>> diff --git a/drivers/misc/mei/vsc-tp.c b/drivers/misc/mei/vsc-tp.c
>> index 267d0de5fade..99a55451e1fc 100644
>> --- a/drivers/misc/mei/vsc-tp.c
>> +++ b/drivers/misc/mei/vsc-tp.c
>> @@ -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
>> diff --git a/drivers/misc/mei/vsc-tp.h b/drivers/misc/mei/vsc-tp.h
>> index 14ca195cbddc..f9513ddc3e40 100644
>> --- a/drivers/misc/mei/vsc-tp.h
>> +++ b/drivers/misc/mei/vsc-tp.h
>> @@ -37,9 +37,6 @@ int vsc_tp_xfer(struct vsc_tp *tp, u8 cmd, const void
>> *obuf, size_t olen,
>>  int vsc_tp_register_event_cb(struct vsc_tp *tp, vsc_tp_event_cb_t event_cb,
>>  			     void *context);
>>
>> -int vsc_tp_request_irq(struct vsc_tp *tp);
>> -void vsc_tp_free_irq(struct vsc_tp *tp);
>> -
>>  void vsc_tp_intr_enable(struct vsc_tp *tp);
>>  void vsc_tp_intr_disable(struct vsc_tp *tp);
>>  void vsc_tp_intr_synchronize(struct vsc_tp *tp);
>> --
>> 2.49.0
>