Skip to contentSkip to conversation

IB/qib: use arch_phys_wc_add()

DISCUSSION Dan Carpenter 1 participant 1 message May 12, 2015 InfiniBand

lore
Share & tools
lore
#0 lore raw

Hello Luis R. Rodriguez,

The patch d4988623cc60: "IB/qib: use arch_phys_wc_add()" from Apr 22, 2015, leads to the following static checker warning:

	drivers/infiniband/hw/qib/qib_wc_x86_64.c:120 qib_enable_wc()
	warn: unsigned 'dd->wc_cookie' is never less than zero.

drivers/infiniband/hw/qib/qib_wc_x86_64.c
117
118 if (!ret) {
119 dd->wc_cookie = arch_phys_wc_add(pioaddr, piolen);
120 if (dd->wc_cookie < 0)

                            ^^^^^^^^^^^^^^^^^

arch_phys_wc_add() does return negatives on error but this is unsigned.

   121                          ret = -EINVAL;
   122          }
   123  
   124          return ret;
   125  }

regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html