Re: [PATCH rdma-next 1/3] qedr: Add wrapping generic structure for qpidr and adjust idr routines.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Yuval,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v4.18-rc3 next-20180706]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Yuval-Bason/Add-SRQ-support-for-Cavium-adapters/20180708-154805
config: x86_64-allmodconfig (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   drivers/infiniband//hw/qedr/verbs.c: In function 'qedr_create_qp':
>> drivers/infiniband//hw/qedr/verbs.c:1713:2: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
     if (rdma_protocol_iwarp(&dev->ibdev, 1))
     ^~
   drivers/infiniband//hw/qedr/verbs.c:1715:3: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
      if (rc)
      ^~

vim +/if +1713 drivers/infiniband//hw/qedr/verbs.c

  1659	
  1660	struct ib_qp *qedr_create_qp(struct ib_pd *ibpd,
  1661				     struct ib_qp_init_attr *attrs,
  1662				     struct ib_udata *udata)
  1663	{
  1664		struct qedr_dev *dev = get_qedr_dev(ibpd->device);
  1665		struct qedr_pd *pd = get_qedr_pd(ibpd);
  1666		struct qedr_qp *qp;
  1667		struct ib_qp *ibqp;
  1668		int rc = 0;
  1669	
  1670		DP_DEBUG(dev, QEDR_MSG_QP, "create qp: called from %s, pd=%p\n",
  1671			 udata ? "user library" : "kernel", pd);
  1672	
  1673		rc = qedr_check_qp_attrs(ibpd, dev, attrs);
  1674		if (rc)
  1675			return ERR_PTR(rc);
  1676	
  1677		if (attrs->srq)
  1678			return ERR_PTR(-EINVAL);
  1679	
  1680		DP_DEBUG(dev, QEDR_MSG_QP,
  1681			 "create qp: called from %s, event_handler=%p, eepd=%p sq_cq=%p, sq_icid=%d, rq_cq=%p, rq_icid=%d\n",
  1682			 udata ? "user library" : "kernel", attrs->event_handler, pd,
  1683			 get_qedr_cq(attrs->send_cq),
  1684			 get_qedr_cq(attrs->send_cq)->icid,
  1685			 get_qedr_cq(attrs->recv_cq),
  1686			 get_qedr_cq(attrs->recv_cq)->icid);
  1687	
  1688		qp = kzalloc(sizeof(*qp), GFP_KERNEL);
  1689		if (!qp) {
  1690			DP_ERR(dev, "create qp: failed allocating memory\n");
  1691			return ERR_PTR(-ENOMEM);
  1692		}
  1693	
  1694		qedr_set_common_qp_params(dev, qp, pd, attrs);
  1695	
  1696		if (attrs->qp_type == IB_QPT_GSI) {
  1697			ibqp = qedr_create_gsi_qp(dev, attrs, qp);
  1698			if (IS_ERR(ibqp))
  1699				kfree(qp);
  1700			return ibqp;
  1701		}
  1702	
  1703		if (udata)
  1704			rc = qedr_create_user_qp(dev, qp, ibpd, udata, attrs);
  1705		else
  1706			rc = qedr_create_kernel_qp(dev, qp, ibpd, attrs);
  1707	
  1708		if (rc)
  1709			goto err;
  1710	
  1711		qp->ibqp.qp_num = qp->qp_id;
  1712	
> 1713		if (rdma_protocol_iwarp(&dev->ibdev, 1))
  1714			rc = qedr_idr_add(dev, &dev->qpidr, qp, qp->qp_id);
  1715			if (rc)
  1716				goto err;
  1717	
  1718		return &qp->ibqp;
  1719	
  1720	err:
  1721		kfree(qp);
  1722	
  1723		return ERR_PTR(-EFAULT);
  1724	}
  1725	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux