Skip to contentSkip to conversation

error missed ifndef CONFIG_HAVE_SPARSE_IRQ

PATCH Applied Dean Nelson 3 participants 4 messages Sep 5, 2008 PCI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 error missed ifndef CONFIG_HAVE_SPARSE_IRQ

An error return from create_irq_nr() is 0, but an error return from create_irq() is -1.

---

 drivers/pci/htirq.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/htirq.c +1 -1
Index: linux/drivers/pci/htirq.c
===================================================================
@@ -144,7 +144,7 @@ int __ht_create_irq(struct pci_dev *dev,
 #else
 	irq = create_irq();
 #endif
-	if (irq == 0) {
+	if (irq <= 0) {
 		kfree(cfg);
 		return -EBUSY;
 	}
Applied
#1 lore raw
Quoted 4 lines · Dean Nelson

An error return from create_irq_nr() is 0, but an error return from create_irq() is -1.

applied to tip/irq/sparseirq - thanks Dean!

Ingo

#2 lore raw
Quoted 10 lines · Ingo Molnar
Quoted 4 lines · Dean Nelson

An error return from create_irq_nr() is 0, but an error return from create_irq() is -1.

applied to tip/irq/sparseirq - thanks Dean!

need to change irq to int too

drivers/pci/htirq.c +0 -0
index 7c5aef1..468115d 100644
@@ -109,7 +109,7 @@ int __ht_create_irq(struct pci_dev *dev, int idx,

ht_irq_update_t *update)

        u32 data;
        int max_irq;
        int pos;
-       unsigned int irq;
+       int irq;
        unsigned int irq_want;

        pos = pci_find_ht_capability(dev, HT_CAPTYPE_IRQ);
Applied
#3 lore raw
Quoted 4 lines · Yinghai Lu
Quoted 3 lines · Ingo Molnar

* Dean Nelson <[email protected]> wrote:

Quoted 8 lines
Quoted 7 lines
Quoted 4 lines

An error return from create_irq_nr() is 0, but an error return from create_irq() is -1.

applied to tip/irq/sparseirq - thanks Dean!

need to change irq to int too

applied to tip/irq/sparseirq - thanks.

Ingo