Skip to contentSkip to conversation

ehca: ret is unsigned, ibmebus_request_irq() negative return ignored in hca_create_eq()

PATCH In review Roel Kluin 2 participants 2 messages Apr 23, 2008 – Apr 28, 2008 InfiniBand

lore
Share & tools
lore

Roel Kluin

author
#0 lore raw

PATCH 1/1 ehca: ret is unsigned, ibmebus_request_irq() negative return ignored in hca_create_eq()

drivers/infiniband/hw/ehca/ehca_eq.c +5 -4
index b4ac617..9727235 100644
@@ -59,6 +59,7 @@ int ehca_create_eq(struct ehca_shca *shca,
 	u32 i;
 	void *vpage;
 	struct ib_device *ib_dev = &shca->ib_device;
+	int ret2;
 
 	spin_lock_init(&eq->spinlock);
 	spin_lock_init(&eq->irq_spinlock);
@@ -123,18 +124,18 @@ int ehca_create_eq(struct ehca_shca *shca,
 
 	/* register interrupt handlers and initialize work queues */
 	if (type == EHCA_EQ) {
-		ret = ibmebus_request_irq(eq->ist, ehca_interrupt_eq,
+		ret2 = ibmebus_request_irq(eq->ist, ehca_interrupt_eq,
 					  IRQF_DISABLED, "ehca_eq",
 					  (void *)shca);
-		if (ret < 0)
+		if (ret2 < 0)
 			ehca_err(ib_dev, "Can't map interrupt handler.");
 
 		tasklet_init(&eq->interrupt_task, ehca_tasklet_eq, (long)shca);
 	} else if (type == EHCA_NEQ) {
-		ret = ibmebus_request_irq(eq->ist, ehca_interrupt_neq,
+		ret2 = ibmebus_request_irq(eq->ist, ehca_interrupt_neq,
 					  IRQF_DISABLED, "ehca_neq",
 					  (void *)shca);
-		if (ret < 0)
+		if (ret2 < 0)
 			ehca_err(ib_dev, "Can't map interrupt handler.");
 
 		tasklet_init(&eq->interrupt_task, ehca_tasklet_neq, (long)shca);
#1 lore raw

Hello Roel!
Thanks for pointing this out.
Will send another version with a more consistent naming convention for return variable from firmware. We used to naming it h_ret. Regards
Nam

Roel Kluin <[email protected]> wrote on 23.04.2008 23:07:53:

Quoted 36 lines
drivers/infiniband/hw/ehca/ehca_eq.c +5 -4
index b4ac617..9727235 100644
@@ -59,6 +59,7 @@ int ehca_create_eq(struct ehca_shca *shca,
    u32 i;
    void *vpage;
    struct ib_device *ib_dev = &shca->ib_device;
+   int ret2;
 
    spin_lock_init(&eq->spinlock);
    spin_lock_init(&eq->irq_spinlock);
@@ -123,18 +124,18 @@ int ehca_create_eq(struct ehca_shca *shca,
 
    /* register interrupt handlers and initialize work queues */
    if (type == EHCA_EQ) {
-      ret = ibmebus_request_irq(eq->ist, ehca_interrupt_eq,
+      ret2 = ibmebus_request_irq(eq->ist, ehca_interrupt_eq,
                  IRQF_DISABLED, "ehca_eq",
                  (void *)shca);
-      if (ret < 0)
+      if (ret2 < 0)
          ehca_err(ib_dev, "Can't map interrupt handler.");
 
       tasklet_init(&eq->interrupt_task, ehca_tasklet_eq, (long)shca);
    } else if (type == EHCA_NEQ) {
-      ret = ibmebus_request_irq(eq->ist, ehca_interrupt_neq,
+      ret2 = ibmebus_request_irq(eq->ist, ehca_interrupt_neq,
                  IRQF_DISABLED, "ehca_neq",
                  (void *)shca);
-      if (ret < 0)
+      if (ret2 < 0)
          ehca_err(ib_dev, "Can't map interrupt handler.");
 
       tasklet_init(&eq->interrupt_task, ehca_tasklet_neq, (long)shca);