Patchwork [v3,-tip,3/5] x86, MSI: Minor readability fixes

login
register
mail settings
Submitter Alexander Gordeev
Date Oct. 1, 2012, 8:11 a.m.
Message ID <1638b429b0e5684b6620ef36d101ef782ddeacb8.1349074231.git.agordeev@redhat.com>
Download mbox | patch
Permalink /patch/188245/
State Not Applicable
Delegated to: David Miller
Headers show

Comments

Alexander Gordeev - Oct. 1, 2012, 8:11 a.m.
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
---
 arch/x86/kernel/apic/io_apic.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
Ingo Molnar - Oct. 2, 2012, 4:57 a.m.
* Alexander Gordeev <agordeev@redhat.com> wrote:

> Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
> ---
>  arch/x86/kernel/apic/io_apic.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
> index 84d632b..0489699 100644
> --- a/arch/x86/kernel/apic/io_apic.c
> +++ b/arch/x86/kernel/apic/io_apic.c
> @@ -3123,7 +3123,7 @@ static int msi_compose_msg(struct pci_dev *pdev, unsigned int irq,
>  
>  	if (irq_remapped(cfg)) {
>  		compose_remapped_msi_msg(pdev, irq, dest, msg, hpet_id);
> -		return err;
> +		return 0;
>  	}
>  
>  	if (x2apic_enabled())
> @@ -3150,7 +3150,7 @@ static int msi_compose_msg(struct pci_dev *pdev, unsigned int irq,
>  			MSI_DATA_DELIVERY_LOWPRI) |
>  		MSI_DATA_VECTOR(cfg->vector);
>  
> -	return err;
> +	return 0;
>  }
>  
>  static int
> @@ -3232,7 +3232,7 @@ int setup_msix_irqs(struct pci_dev *dev, int nvec)
>  	list_for_each_entry(msidesc, &dev->msi_list, list) {
>  		irq = create_irq_nr(irq_want, node);
>  		if (irq == 0)
> -			return -1;
> +			return -ENOSPC;
>  		irq_want = irq + 1;
>  		if (!irq_remapping_enabled)
>  			goto no_ir;

This should be backported into earlier patches.

Thanks,

	Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" 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 84d632b..0489699 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -3123,7 +3123,7 @@  static int msi_compose_msg(struct pci_dev *pdev, unsigned int irq,
 
 	if (irq_remapped(cfg)) {
 		compose_remapped_msi_msg(pdev, irq, dest, msg, hpet_id);
-		return err;
+		return 0;
 	}
 
 	if (x2apic_enabled())
@@ -3150,7 +3150,7 @@  static int msi_compose_msg(struct pci_dev *pdev, unsigned int irq,
 			MSI_DATA_DELIVERY_LOWPRI) |
 		MSI_DATA_VECTOR(cfg->vector);
 
-	return err;
+	return 0;
 }
 
 static int
@@ -3232,7 +3232,7 @@  int setup_msix_irqs(struct pci_dev *dev, int nvec)
 	list_for_each_entry(msidesc, &dev->msi_list, list) {
 		irq = create_irq_nr(irq_want, node);
 		if (irq == 0)
-			return -1;
+			return -ENOSPC;
 		irq_want = irq + 1;
 		if (!irq_remapping_enabled)
 			goto no_ir;