Re: [PATCH v4 13/13] SIW addition to kernel build environment (fwd)

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

 



Hello,

There are two occurrences of the REG_MR and DEREG_MR constants around line
480.

julia

---------- Forwarded message ----------
Date: Thu, 31 Jan 2019 11:58:44 +0800
From: kbuild test robot <lkp@xxxxxxxxx>
To: kbuild@xxxxxx
Cc: Julia Lawall <julia.lawall@xxxxxxx>
Subject: Re: [PATCH v4 13/13] SIW addition to kernel build environment

CC: kbuild-all@xxxxxx
In-Reply-To: <20190130172136.23625-14-bmt@xxxxxxxxxxxxxx>
References: <20190130172136.23625-14-bmt@xxxxxxxxxxxxxx>
TO: bmt@xxxxxxxxxxxxxx
CC: linux-rdma@xxxxxxxxxxxxxxx
CC: Bernard Metzler <bmt@xxxxxxxxxxxxxx>

Hi Bernard,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on rdma/for-next]
[also build test WARNING on next-20190130]
[cannot apply to v5.0-rc4]
[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/bmt-zurich-ibm-com/SIW-Request-for-Comments/20190131-100843
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git for-next
:::::: branch date: 2 hours ago
:::::: commit date: 2 hours ago

>> drivers/infiniband/sw/siw/siw_main.c:480:5-39: duplicated argument to & or |
   drivers/infiniband/sw/siw/siw_main.c:481:5-41: duplicated argument to & or |

# https://github.com/0day-ci/linux/commit/2f37d4c51c38c1237c47d626086813d10e799e39
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout 2f37d4c51c38c1237c47d626086813d10e799e39
vim +480 drivers/infiniband/sw/siw/siw_main.c

778298ca Bernard Metzler 2019-01-30  418
778298ca Bernard Metzler 2019-01-30  419  static struct siw_device *siw_device_create(struct net_device *netdev)
778298ca Bernard Metzler 2019-01-30  420  {
778298ca Bernard Metzler 2019-01-30  421  	struct siw_device *sdev;
778298ca Bernard Metzler 2019-01-30  422  	struct ib_device *base_dev;
778298ca Bernard Metzler 2019-01-30  423  	struct device *parent = netdev->dev.parent;
778298ca Bernard Metzler 2019-01-30  424
778298ca Bernard Metzler 2019-01-30  425  	sdev = (struct siw_device *)ib_alloc_device(sizeof(*sdev));
778298ca Bernard Metzler 2019-01-30  426  	if (!sdev)
778298ca Bernard Metzler 2019-01-30  427  		goto out;
778298ca Bernard Metzler 2019-01-30  428
778298ca Bernard Metzler 2019-01-30  429  	base_dev = &sdev->base_dev;
778298ca Bernard Metzler 2019-01-30  430
778298ca Bernard Metzler 2019-01-30  431  	base_dev->driver_unregister = siw_unregistered;
778298ca Bernard Metzler 2019-01-30  432
778298ca Bernard Metzler 2019-01-30  433  	if (!parent) {
778298ca Bernard Metzler 2019-01-30  434  		/*
778298ca Bernard Metzler 2019-01-30  435  		 * The loopback device has no parent device,
778298ca Bernard Metzler 2019-01-30  436  		 * so it appears as a top-level device. To support
778298ca Bernard Metzler 2019-01-30  437  		 * loopback device connectivity, take this device
778298ca Bernard Metzler 2019-01-30  438  		 * as the parent device. Skip all other devices
778298ca Bernard Metzler 2019-01-30  439  		 * w/o parent device.
778298ca Bernard Metzler 2019-01-30  440  		 */
778298ca Bernard Metzler 2019-01-30  441  		if (netdev->type != ARPHRD_LOOPBACK) {
778298ca Bernard Metzler 2019-01-30  442  			pr_warn("siw: device %s skipped (no parent dev)\n",
778298ca Bernard Metzler 2019-01-30  443  				netdev->name);
778298ca Bernard Metzler 2019-01-30  444  			ib_dealloc_device(base_dev);
778298ca Bernard Metzler 2019-01-30  445  			sdev = NULL;
778298ca Bernard Metzler 2019-01-30  446  			goto out;
778298ca Bernard Metzler 2019-01-30  447  		}
778298ca Bernard Metzler 2019-01-30  448  		parent = &netdev->dev;
778298ca Bernard Metzler 2019-01-30  449  	}
778298ca Bernard Metzler 2019-01-30  450  	base_dev->iwcm = kmalloc(sizeof(struct iw_cm_verbs), GFP_KERNEL);
778298ca Bernard Metzler 2019-01-30  451  	if (!base_dev->iwcm) {
778298ca Bernard Metzler 2019-01-30  452  		ib_dealloc_device(base_dev);
778298ca Bernard Metzler 2019-01-30  453  		sdev = NULL;
778298ca Bernard Metzler 2019-01-30  454  		goto out;
778298ca Bernard Metzler 2019-01-30  455  	}
778298ca Bernard Metzler 2019-01-30  456
778298ca Bernard Metzler 2019-01-30  457  	sdev->netdev = netdev;
778298ca Bernard Metzler 2019-01-30  458
778298ca Bernard Metzler 2019-01-30  459  	memset(&base_dev->node_guid, 0, sizeof(base_dev->node_guid));
778298ca Bernard Metzler 2019-01-30  460
778298ca Bernard Metzler 2019-01-30  461  	if (netdev->type != ARPHRD_LOOPBACK) {
778298ca Bernard Metzler 2019-01-30  462  		memcpy(&base_dev->node_guid, netdev->dev_addr, 6);
778298ca Bernard Metzler 2019-01-30  463  	} else {
778298ca Bernard Metzler 2019-01-30  464  		/*
778298ca Bernard Metzler 2019-01-30  465  		 * The loopback device does not have a HW address,
778298ca Bernard Metzler 2019-01-30  466  		 * but connection mangagement lib expects gid != 0
778298ca Bernard Metzler 2019-01-30  467  		 */
778298ca Bernard Metzler 2019-01-30  468  		size_t gidlen = min_t(size_t, strlen(base_dev->name), 6);
778298ca Bernard Metzler 2019-01-30  469
778298ca Bernard Metzler 2019-01-30  470  		memcpy(&base_dev->node_guid, base_dev->name, gidlen);
778298ca Bernard Metzler 2019-01-30  471  	}
778298ca Bernard Metzler 2019-01-30  472  	base_dev->owner = THIS_MODULE;
778298ca Bernard Metzler 2019-01-30  473
778298ca Bernard Metzler 2019-01-30  474  	base_dev->uverbs_cmd_mask =
778298ca Bernard Metzler 2019-01-30  475  	    (1ull << IB_USER_VERBS_CMD_GET_CONTEXT) |
778298ca Bernard Metzler 2019-01-30  476  	    (1ull << IB_USER_VERBS_CMD_QUERY_DEVICE) |
778298ca Bernard Metzler 2019-01-30  477  	    (1ull << IB_USER_VERBS_CMD_QUERY_PORT) |
778298ca Bernard Metzler 2019-01-30  478  	    (1ull << IB_USER_VERBS_CMD_ALLOC_PD) |
778298ca Bernard Metzler 2019-01-30  479  	    (1ull << IB_USER_VERBS_CMD_DEALLOC_PD) |
778298ca Bernard Metzler 2019-01-30 @480  	    (1ull << IB_USER_VERBS_CMD_REG_MR) |
778298ca Bernard Metzler 2019-01-30  481  	    (1ull << IB_USER_VERBS_CMD_DEREG_MR) |
778298ca Bernard Metzler 2019-01-30  482  	    (1ull << IB_USER_VERBS_CMD_CREATE_COMP_CHANNEL) |
778298ca Bernard Metzler 2019-01-30  483  	    (1ull << IB_USER_VERBS_CMD_CREATE_CQ) |
778298ca Bernard Metzler 2019-01-30  484  	    (1ull << IB_USER_VERBS_CMD_POLL_CQ) |
778298ca Bernard Metzler 2019-01-30  485  	    (1ull << IB_USER_VERBS_CMD_REQ_NOTIFY_CQ) |
778298ca Bernard Metzler 2019-01-30  486  	    (1ull << IB_USER_VERBS_CMD_DESTROY_CQ) |
778298ca Bernard Metzler 2019-01-30  487  	    (1ull << IB_USER_VERBS_CMD_CREATE_QP) |
778298ca Bernard Metzler 2019-01-30  488  	    (1ull << IB_USER_VERBS_CMD_QUERY_QP) |
778298ca Bernard Metzler 2019-01-30  489  	    (1ull << IB_USER_VERBS_CMD_MODIFY_QP) |
778298ca Bernard Metzler 2019-01-30  490  	    (1ull << IB_USER_VERBS_CMD_DESTROY_QP) |
778298ca Bernard Metzler 2019-01-30  491  	    (1ull << IB_USER_VERBS_CMD_POST_SEND) |
778298ca Bernard Metzler 2019-01-30  492  	    (1ull << IB_USER_VERBS_CMD_POST_RECV) |
778298ca Bernard Metzler 2019-01-30  493  	    (1ull << IB_USER_VERBS_CMD_CREATE_SRQ) |
778298ca Bernard Metzler 2019-01-30  494  	    (1ull << IB_USER_VERBS_CMD_MODIFY_SRQ) |
778298ca Bernard Metzler 2019-01-30  495  	    (1ull << IB_USER_VERBS_CMD_QUERY_SRQ) |
778298ca Bernard Metzler 2019-01-30  496  	    (1ull << IB_USER_VERBS_CMD_DESTROY_SRQ) |
778298ca Bernard Metzler 2019-01-30  497  	    (1ull << IB_USER_VERBS_CMD_REG_MR) |
778298ca Bernard Metzler 2019-01-30  498  	    (1ull << IB_USER_VERBS_CMD_DEREG_MR) |
778298ca Bernard Metzler 2019-01-30  499  	    (1ull << IB_USER_VERBS_CMD_POST_SRQ_RECV);
778298ca Bernard Metzler 2019-01-30  500
778298ca Bernard Metzler 2019-01-30  501  	base_dev->node_type = RDMA_NODE_RNIC;
778298ca Bernard Metzler 2019-01-30  502  	memcpy(base_dev->node_desc, SIW_NODE_DESC_COMMON,
778298ca Bernard Metzler 2019-01-30  503  	       sizeof(SIW_NODE_DESC_COMMON));
778298ca Bernard Metzler 2019-01-30  504
778298ca Bernard Metzler 2019-01-30  505  	/*
778298ca Bernard Metzler 2019-01-30  506  	 * Current model (one-to-one device association):
778298ca Bernard Metzler 2019-01-30  507  	 * One Softiwarp device per net_device or, equivalently,
778298ca Bernard Metzler 2019-01-30  508  	 * per physical port.
778298ca Bernard Metzler 2019-01-30  509  	 */
778298ca Bernard Metzler 2019-01-30  510  	base_dev->phys_port_cnt = 1;
778298ca Bernard Metzler 2019-01-30  511
778298ca Bernard Metzler 2019-01-30  512  	base_dev->dev.parent = parent;
778298ca Bernard Metzler 2019-01-30  513  	base_dev->dev.dma_ops = &dma_virt_ops;
778298ca Bernard Metzler 2019-01-30  514
778298ca Bernard Metzler 2019-01-30  515  	base_dev->num_comp_vectors = num_possible_cpus();
778298ca Bernard Metzler 2019-01-30  516  	base_dev->ops.query_device = siw_query_device;
778298ca Bernard Metzler 2019-01-30  517  	base_dev->ops.query_port = siw_query_port;
778298ca Bernard Metzler 2019-01-30  518  	base_dev->ops.get_port_immutable = siw_get_port_immutable;
778298ca Bernard Metzler 2019-01-30  519  	base_dev->ops.get_netdev = siw_get_netdev;
778298ca Bernard Metzler 2019-01-30  520  	base_dev->ops.query_qp = siw_query_qp;
778298ca Bernard Metzler 2019-01-30  521  	base_dev->ops.modify_port = siw_modify_port;
778298ca Bernard Metzler 2019-01-30  522  	base_dev->ops.query_pkey = siw_query_pkey;
778298ca Bernard Metzler 2019-01-30  523  	base_dev->ops.query_gid = siw_query_gid;
778298ca Bernard Metzler 2019-01-30  524  	base_dev->ops.alloc_ucontext = siw_alloc_ucontext;
778298ca Bernard Metzler 2019-01-30  525  	base_dev->ops.dealloc_ucontext = siw_dealloc_ucontext;
778298ca Bernard Metzler 2019-01-30  526  	base_dev->ops.mmap = siw_mmap;
778298ca Bernard Metzler 2019-01-30  527  	base_dev->ops.alloc_pd = siw_alloc_pd;
778298ca Bernard Metzler 2019-01-30  528  	base_dev->ops.dealloc_pd = siw_dealloc_pd;
778298ca Bernard Metzler 2019-01-30  529  	base_dev->ops.create_ah = siw_create_ah;
778298ca Bernard Metzler 2019-01-30  530  	base_dev->ops.destroy_ah = siw_destroy_ah;
778298ca Bernard Metzler 2019-01-30  531  	base_dev->ops.create_qp = siw_create_qp;
778298ca Bernard Metzler 2019-01-30  532  	base_dev->ops.modify_qp = siw_verbs_modify_qp;
778298ca Bernard Metzler 2019-01-30  533  	base_dev->ops.destroy_qp = siw_destroy_qp;
778298ca Bernard Metzler 2019-01-30  534  	base_dev->ops.create_cq = siw_create_cq;
778298ca Bernard Metzler 2019-01-30  535  	base_dev->ops.destroy_cq = siw_destroy_cq;
778298ca Bernard Metzler 2019-01-30  536  	base_dev->ops.resize_cq = NULL;
778298ca Bernard Metzler 2019-01-30  537  	base_dev->ops.poll_cq = siw_poll_cq;
778298ca Bernard Metzler 2019-01-30  538  	base_dev->ops.get_dma_mr = siw_get_dma_mr;
778298ca Bernard Metzler 2019-01-30  539  	base_dev->ops.reg_user_mr = siw_reg_user_mr;
778298ca Bernard Metzler 2019-01-30  540  	base_dev->ops.dereg_mr = siw_dereg_mr;
778298ca Bernard Metzler 2019-01-30  541  	base_dev->ops.alloc_mr = siw_alloc_mr;
778298ca Bernard Metzler 2019-01-30  542  	base_dev->ops.map_mr_sg = siw_map_mr_sg;
778298ca Bernard Metzler 2019-01-30  543  	base_dev->ops.dealloc_mw = NULL;
778298ca Bernard Metzler 2019-01-30  544
778298ca Bernard Metzler 2019-01-30  545  	base_dev->ops.create_srq = siw_create_srq;
778298ca Bernard Metzler 2019-01-30  546  	base_dev->ops.modify_srq = siw_modify_srq;
778298ca Bernard Metzler 2019-01-30  547  	base_dev->ops.query_srq = siw_query_srq;
778298ca Bernard Metzler 2019-01-30  548  	base_dev->ops.destroy_srq = siw_destroy_srq;
778298ca Bernard Metzler 2019-01-30  549  	base_dev->ops.post_srq_recv = siw_post_srq_recv;
778298ca Bernard Metzler 2019-01-30  550
778298ca Bernard Metzler 2019-01-30  551  	base_dev->ops.attach_mcast = NULL;
778298ca Bernard Metzler 2019-01-30  552  	base_dev->ops.detach_mcast = NULL;
778298ca Bernard Metzler 2019-01-30  553  	base_dev->ops.process_mad = siw_no_mad;
778298ca Bernard Metzler 2019-01-30  554
778298ca Bernard Metzler 2019-01-30  555  	base_dev->ops.req_notify_cq = siw_req_notify_cq;
778298ca Bernard Metzler 2019-01-30  556  	base_dev->ops.post_send = siw_post_send;
778298ca Bernard Metzler 2019-01-30  557  	base_dev->ops.post_recv = siw_post_receive;
778298ca Bernard Metzler 2019-01-30  558
778298ca Bernard Metzler 2019-01-30  559  	base_dev->ops.drain_sq = siw_verbs_sq_flush;
778298ca Bernard Metzler 2019-01-30  560  	base_dev->ops.drain_rq = siw_verbs_rq_flush;
778298ca Bernard Metzler 2019-01-30  561
778298ca Bernard Metzler 2019-01-30  562  	base_dev->iwcm->connect = siw_connect;
778298ca Bernard Metzler 2019-01-30  563  	base_dev->iwcm->accept = siw_accept;
778298ca Bernard Metzler 2019-01-30  564  	base_dev->iwcm->reject = siw_reject;
778298ca Bernard Metzler 2019-01-30  565  	base_dev->iwcm->create_listen = siw_create_listen;
778298ca Bernard Metzler 2019-01-30  566  	base_dev->iwcm->destroy_listen = siw_destroy_listen;
778298ca Bernard Metzler 2019-01-30  567  	base_dev->iwcm->add_ref = siw_qp_get_ref;
778298ca Bernard Metzler 2019-01-30  568  	base_dev->iwcm->rem_ref = siw_qp_put_ref;
778298ca Bernard Metzler 2019-01-30  569  	base_dev->iwcm->get_qp = siw_get_base_qp;
778298ca Bernard Metzler 2019-01-30  570
778298ca Bernard Metzler 2019-01-30  571  	/* Disable TCP port mapper service */
778298ca Bernard Metzler 2019-01-30  572  	base_dev->iwcm->driver_flags = IW_F_NO_PORT_MAP;
778298ca Bernard Metzler 2019-01-30  573
778298ca Bernard Metzler 2019-01-30  574  	memcpy(base_dev->iwcm->ifname, netdev->name,
778298ca Bernard Metzler 2019-01-30  575  	       sizeof(base_dev->iwcm->ifname));
778298ca Bernard Metzler 2019-01-30  576
778298ca Bernard Metzler 2019-01-30  577  	sdev->attrs.max_qp = SIW_MAX_QP;
778298ca Bernard Metzler 2019-01-30  578  	sdev->attrs.max_qp_wr = SIW_MAX_QP_WR;
778298ca Bernard Metzler 2019-01-30  579  	sdev->attrs.max_ord = SIW_MAX_ORD_QP;
778298ca Bernard Metzler 2019-01-30  580  	sdev->attrs.max_ird = SIW_MAX_IRD_QP;
778298ca Bernard Metzler 2019-01-30  581  	sdev->attrs.max_sge = SIW_MAX_SGE;
778298ca Bernard Metzler 2019-01-30  582  	sdev->attrs.max_sge_rd = SIW_MAX_SGE_RD;
778298ca Bernard Metzler 2019-01-30  583  	sdev->attrs.max_cq = SIW_MAX_CQ;
778298ca Bernard Metzler 2019-01-30  584  	sdev->attrs.max_cqe = SIW_MAX_CQE;
778298ca Bernard Metzler 2019-01-30  585  	sdev->attrs.max_mr = SIW_MAX_MR;
778298ca Bernard Metzler 2019-01-30  586  	sdev->attrs.max_pd = SIW_MAX_PD;
778298ca Bernard Metzler 2019-01-30  587  	sdev->attrs.max_mw = SIW_MAX_MW;
778298ca Bernard Metzler 2019-01-30  588  	sdev->attrs.max_fmr = SIW_MAX_FMR;
778298ca Bernard Metzler 2019-01-30  589  	sdev->attrs.max_srq = SIW_MAX_SRQ;
778298ca Bernard Metzler 2019-01-30  590  	sdev->attrs.max_srq_wr = SIW_MAX_SRQ_WR;
778298ca Bernard Metzler 2019-01-30  591  	sdev->attrs.max_srq_sge = SIW_MAX_SGE;
778298ca Bernard Metzler 2019-01-30  592
778298ca Bernard Metzler 2019-01-30  593  	siw_idr_init(sdev);
778298ca Bernard Metzler 2019-01-30  594  	INIT_LIST_HEAD(&sdev->cep_list);
778298ca Bernard Metzler 2019-01-30  595  	INIT_LIST_HEAD(&sdev->qp_list);
778298ca Bernard Metzler 2019-01-30  596  	INIT_LIST_HEAD(&sdev->mr_list);
778298ca Bernard Metzler 2019-01-30  597
778298ca Bernard Metzler 2019-01-30  598  	atomic_set(&sdev->num_ctx, 0);
778298ca Bernard Metzler 2019-01-30  599  	atomic_set(&sdev->num_srq, 0);
778298ca Bernard Metzler 2019-01-30  600  	atomic_set(&sdev->num_qp, 0);
778298ca Bernard Metzler 2019-01-30  601  	atomic_set(&sdev->num_cq, 0);
778298ca Bernard Metzler 2019-01-30  602  	atomic_set(&sdev->num_mr, 0);
778298ca Bernard Metzler 2019-01-30  603  	atomic_set(&sdev->num_pd, 0);
778298ca Bernard Metzler 2019-01-30  604  	atomic_set(&sdev->num_cep, 0);
778298ca Bernard Metzler 2019-01-30  605
778298ca Bernard Metzler 2019-01-30  606  	sdev->numa_node = dev_to_node(parent);
778298ca Bernard Metzler 2019-01-30  607  out:
778298ca Bernard Metzler 2019-01-30  608  	if (sdev)
778298ca Bernard Metzler 2019-01-30  609  		dev_hold(netdev);
778298ca Bernard Metzler 2019-01-30  610
778298ca Bernard Metzler 2019-01-30  611  	return sdev;
778298ca Bernard Metzler 2019-01-30  612  }
778298ca Bernard Metzler 2019-01-30  613

:::::: The code at line 480 was first introduced by commit
:::::: 778298ca8fdd31ab3ce6b85e1493a4d545749fcc SIW network and RDMA core interface

:::::: TO: Bernard Metzler <bmt@xxxxxxxxxxxxxx>
:::::: CC: 0day robot <lkp@xxxxxxxxx>

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



[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