diff mbox series

[2/7] xen/events: remove unused functions

Message ID 20231016062831.20630-3-jgross@suse.com (mailing list archive)
State Accepted
Commit f96c6c588ca81255566a5168e51c9cbbe7b86def
Headers show
Series xen/events: do some cleanups in events_base.c | expand

Commit Message

Jürgen Groß Oct. 16, 2023, 6:28 a.m. UTC
There are no users of xen_irq_from_pirq() and xen_set_irq_pending().

Remove those functions.

Signed-off-by: Juergen Gross <jgross@suse.com>
---
 drivers/xen/events/events_base.c | 30 ------------------------------
 include/xen/events.h             |  4 ----
 2 files changed, 34 deletions(-)

Comments

Oleksandr Tyshchenko Nov. 13, 2023, 2:20 p.m. UTC | #1
On 16.10.23 09:28, Juergen Gross wrote:

Hello Juergen


> There are no users of xen_irq_from_pirq() and xen_set_irq_pending().
> 
> Remove those functions.
> 
> Signed-off-by: Juergen Gross <jgross@suse.com>


Reviewed-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>


> ---
>   drivers/xen/events/events_base.c | 30 ------------------------------
>   include/xen/events.h             |  4 ----
>   2 files changed, 34 deletions(-)
> 
> diff --git a/drivers/xen/events/events_base.c b/drivers/xen/events/events_base.c
> index 0e458b1c0c8c..1d797dd85d0e 100644
> --- a/drivers/xen/events/events_base.c
> +++ b/drivers/xen/events/events_base.c
> @@ -1165,29 +1165,6 @@ int xen_destroy_irq(int irq)
>   	return rc;
>   }
>   
> -int xen_irq_from_pirq(unsigned pirq)
> -{
> -	int irq;
> -
> -	struct irq_info *info;
> -
> -	mutex_lock(&irq_mapping_update_lock);
> -
> -	list_for_each_entry(info, &xen_irq_list_head, list) {
> -		if (info->type != IRQT_PIRQ)
> -			continue;
> -		irq = info->irq;
> -		if (info->u.pirq.pirq == pirq)
> -			goto out;
> -	}
> -	irq = -1;
> -out:
> -	mutex_unlock(&irq_mapping_update_lock);
> -
> -	return irq;
> -}
> -
> -
>   int xen_pirq_from_irq(unsigned irq)
>   {
>   	return pirq_from_irq(irq);
> @@ -2026,13 +2003,6 @@ void xen_clear_irq_pending(int irq)
>   		event_handler_exit(info);
>   }
>   EXPORT_SYMBOL(xen_clear_irq_pending);
> -void xen_set_irq_pending(int irq)
> -{
> -	evtchn_port_t evtchn = evtchn_from_irq(irq);
> -
> -	if (VALID_EVTCHN(evtchn))
> -		set_evtchn(evtchn);
> -}
>   
>   bool xen_test_irq_pending(int irq)
>   {
> diff --git a/include/xen/events.h b/include/xen/events.h
> index 23932b0673dc..a129cafa80ed 100644
> --- a/include/xen/events.h
> +++ b/include/xen/events.h
> @@ -88,7 +88,6 @@ void xen_irq_resume(void);
>   
>   /* Clear an irq's pending state, in preparation for polling on it */
>   void xen_clear_irq_pending(int irq);
> -void xen_set_irq_pending(int irq);
>   bool xen_test_irq_pending(int irq);
>   
>   /* Poll waiting for an irq to become pending.  In the usual case, the
> @@ -122,9 +121,6 @@ int xen_bind_pirq_msi_to_irq(struct pci_dev *dev, struct msi_desc *msidesc,
>   /* De-allocates the above mentioned physical interrupt. */
>   int xen_destroy_irq(int irq);
>   
> -/* Return irq from pirq */
> -int xen_irq_from_pirq(unsigned pirq);
> -
>   /* Return the pirq allocated to the irq. */
>   int xen_pirq_from_irq(unsigned irq);
>
diff mbox series

Patch

diff --git a/drivers/xen/events/events_base.c b/drivers/xen/events/events_base.c
index 0e458b1c0c8c..1d797dd85d0e 100644
--- a/drivers/xen/events/events_base.c
+++ b/drivers/xen/events/events_base.c
@@ -1165,29 +1165,6 @@  int xen_destroy_irq(int irq)
 	return rc;
 }
 
-int xen_irq_from_pirq(unsigned pirq)
-{
-	int irq;
-
-	struct irq_info *info;
-
-	mutex_lock(&irq_mapping_update_lock);
-
-	list_for_each_entry(info, &xen_irq_list_head, list) {
-		if (info->type != IRQT_PIRQ)
-			continue;
-		irq = info->irq;
-		if (info->u.pirq.pirq == pirq)
-			goto out;
-	}
-	irq = -1;
-out:
-	mutex_unlock(&irq_mapping_update_lock);
-
-	return irq;
-}
-
-
 int xen_pirq_from_irq(unsigned irq)
 {
 	return pirq_from_irq(irq);
@@ -2026,13 +2003,6 @@  void xen_clear_irq_pending(int irq)
 		event_handler_exit(info);
 }
 EXPORT_SYMBOL(xen_clear_irq_pending);
-void xen_set_irq_pending(int irq)
-{
-	evtchn_port_t evtchn = evtchn_from_irq(irq);
-
-	if (VALID_EVTCHN(evtchn))
-		set_evtchn(evtchn);
-}
 
 bool xen_test_irq_pending(int irq)
 {
diff --git a/include/xen/events.h b/include/xen/events.h
index 23932b0673dc..a129cafa80ed 100644
--- a/include/xen/events.h
+++ b/include/xen/events.h
@@ -88,7 +88,6 @@  void xen_irq_resume(void);
 
 /* Clear an irq's pending state, in preparation for polling on it */
 void xen_clear_irq_pending(int irq);
-void xen_set_irq_pending(int irq);
 bool xen_test_irq_pending(int irq);
 
 /* Poll waiting for an irq to become pending.  In the usual case, the
@@ -122,9 +121,6 @@  int xen_bind_pirq_msi_to_irq(struct pci_dev *dev, struct msi_desc *msidesc,
 /* De-allocates the above mentioned physical interrupt. */
 int xen_destroy_irq(int irq);
 
-/* Return irq from pirq */
-int xen_irq_from_pirq(unsigned pirq);
-
 /* Return the pirq allocated to the irq. */
 int xen_pirq_from_irq(unsigned irq);