Patchwork [v2,09/26] x86, irq: kill create_irq()

login
register
mail settings
Submitter Yinghai Lu
Date Feb. 8, 2013, 7:28 p.m.
Message ID <1360351703-20571-10-git-send-email-yinghai@kernel.org>
Download mbox | patch
Permalink /patch/219273/
State Not Applicable
Headers show

Comments

Yinghai Lu - Feb. 8, 2013, 7:28 p.m.
create_irq() will return -1 when fail to allocate.
create_irq_nr() will return 0 when fail to allocate.

It only causes confusing.

Now we have no user for create_irq(), so remove create_irq() for x86.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: Joerg Roedel <joro@8bytes.org>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
---
 arch/x86/kernel/apic/io_apic.c |   15 ---------------
 1 file changed, 15 deletions(-)
Konrad Rzeszutek Wilk - March 8, 2013, 7:48 p.m.
On Fri, Feb 08, 2013 at 11:28:06AM -0800, Yinghai Lu wrote:
> create_irq() will return -1 when fail to allocate.

.. failing to allocate
> create_irq_nr() will return 0 when fail to allocate.

.. failing..
> 
> It only causes confusing.

confusion.

> 
> Now we have no user for create_irq(), so remove create_irq() for x86.

> 
> Signed-off-by: Yinghai Lu <yinghai@kernel.org>
> Cc: Joerg Roedel <joro@8bytes.org>
> Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> Cc: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
> ---
>  arch/x86/kernel/apic/io_apic.c |   15 ---------------
>  1 file changed, 15 deletions(-)
> 
> diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
> index c703092..4c1a726 100644
> --- a/arch/x86/kernel/apic/io_apic.c
> +++ b/arch/x86/kernel/apic/io_apic.c
> @@ -2968,21 +2968,6 @@ unsigned int create_irq_nr(unsigned int from, int node)
>  	return __create_irqs(from, 1, node);
>  }
>  
> -int create_irq(void)
> -{
> -	int node = cpu_to_node(0);
> -	unsigned int irq_want;
> -	int irq;
> -
> -	irq_want = nr_irqs_gsi;
> -	irq = create_irq_nr(irq_want, node);
> -
> -	if (irq == 0)
> -		irq = -1;
> -
> -	return irq;
> -}
> -
>  void destroy_irq(unsigned int irq)
>  {
>  	struct irq_cfg *cfg = irq_get_chip_data(irq);
> -- 
> 1.7.10.4
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index c703092..4c1a726 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -2968,21 +2968,6 @@  unsigned int create_irq_nr(unsigned int from, int node)
 	return __create_irqs(from, 1, node);
 }
 
-int create_irq(void)
-{
-	int node = cpu_to_node(0);
-	unsigned int irq_want;
-	int irq;
-
-	irq_want = nr_irqs_gsi;
-	irq = create_irq_nr(irq_want, node);
-
-	if (irq == 0)
-		irq = -1;
-
-	return irq;
-}
-
 void destroy_irq(unsigned int irq)
 {
 	struct irq_cfg *cfg = irq_get_chip_data(irq);