Thanks Dan for pointing out, we will address this issue and send out a patch to fix this.
-Regards Devesh > -----Original Message----- > From: [email protected] [mailto:linux-rdma- > [email protected]] On Behalf Of Dan Carpenter > Sent: Thursday, February 26, 2015 6:00 PM > To: Parav Pandit > Cc: [email protected] > Subject: re: RDMA/ocrdma: Add driver for Emulex OneConnect IBoE RDMA > adapter > > Hello Parav Pandit, > > The patch fe2caefcdf58: "RDMA/ocrdma: Add driver for Emulex OneConnect > IBoE RDMA adapter" from Mar 21, 2012, leads to the following static checker > warning: > > drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:1426 > _ocrdma_modify_qp() > warn: bool is not less than zero. > > drivers/infiniband/hw/ocrdma/ocrdma_verbs.c > 1411 int _ocrdma_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, > 1412 int attr_mask) > 1413 { > 1414 int status = 0; > 1415 struct ocrdma_qp *qp; > 1416 struct ocrdma_dev *dev; > 1417 enum ib_qp_state old_qps; > 1418 > 1419 qp = get_ocrdma_qp(ibqp); > 1420 dev = get_ocrdma_dev(ibqp->device); > 1421 if (attr_mask & IB_QP_STATE) > 1422 status = ocrdma_qp_state_change(qp, attr->qp_state, > &old_qps); > 1423 /* if new and previous states are same hw doesn't need to > 1424 * know about it. > 1425 */ > 1426 if (status < 0) > > This check is never true. Based on the comment then the check should > be: > if (status == 1) > return SOMETHING; > > 1427 return status; > 1428 status = ocrdma_mbx_modify_qp(dev, qp, attr, attr_mask); > 1429 > 1430 return status; > 1431 } > > 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 -- 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
