Re: [PATCH v2 3/7] IB/verbs: dealloc_pd verb need ib_udata

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

 



Hi Shamir,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on rdma/for-next]
[also build test ERROR on v4.19-rc7 next-20181012]
[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/Shamir-Rabinovitch/convey-ib_ucontext-via-ib_udata/20181015-021539
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git for-next
config: x86_64-allmodconfig (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   drivers/infiniband//hw/hns/hns_roce_main.c: In function 'hns_roce_register_device':
>> drivers/infiniband//hw/hns/hns_roce_main.c:498:22: error: assignment from incompatible pointer type [-Werror=incompatible-pointer-types]
     ib_dev->dealloc_pd  = hns_roce_dealloc_pd;
                         ^
   cc1: some warnings being treated as errors

vim +498 drivers/infiniband//hw/hns/hns_roce_main.c

9a4435375 oulijun         2016-07-21  442  
9a4435375 oulijun         2016-07-21  443  static int hns_roce_register_device(struct hns_roce_dev *hr_dev)
9a4435375 oulijun         2016-07-21  444  {
9a4435375 oulijun         2016-07-21  445  	int ret;
9a4435375 oulijun         2016-07-21  446  	struct hns_roce_ib_iboe *iboe = NULL;
9a4435375 oulijun         2016-07-21  447  	struct ib_device *ib_dev = NULL;
13ca970e3 Wei Hu(Xavier   2017-08-30  448) 	struct device *dev = hr_dev->dev;
9a4435375 oulijun         2016-07-21  449  
9a4435375 oulijun         2016-07-21  450  	iboe = &hr_dev->iboe;
49fdf6bb0 Lijun Ou        2016-09-20  451  	spin_lock_init(&iboe->lock);
9a4435375 oulijun         2016-07-21  452  
9a4435375 oulijun         2016-07-21  453  	ib_dev = &hr_dev->ib_dev;
9a4435375 oulijun         2016-07-21  454  
9a4435375 oulijun         2016-07-21  455  	ib_dev->owner			= THIS_MODULE;
9a4435375 oulijun         2016-07-21  456  	ib_dev->node_type		= RDMA_NODE_IB_CA;
fecd02eb2 Bart Van Assche 2017-01-20  457  	ib_dev->dev.parent		= dev;
9a4435375 oulijun         2016-07-21  458  
9a4435375 oulijun         2016-07-21  459  	ib_dev->phys_port_cnt		= hr_dev->caps.num_ports;
9a4435375 oulijun         2016-07-21  460  	ib_dev->local_dma_lkey		= hr_dev->caps.reserved_lkey;
9a4435375 oulijun         2016-07-21  461  	ib_dev->num_comp_vectors	= hr_dev->caps.num_comp_vectors;
9a4435375 oulijun         2016-07-21  462  	ib_dev->uverbs_abi_ver		= 1;
9a4435375 oulijun         2016-07-21  463  	ib_dev->uverbs_cmd_mask		=
9a4435375 oulijun         2016-07-21  464  		(1ULL << IB_USER_VERBS_CMD_GET_CONTEXT) |
9a4435375 oulijun         2016-07-21  465  		(1ULL << IB_USER_VERBS_CMD_QUERY_DEVICE) |
9a4435375 oulijun         2016-07-21  466  		(1ULL << IB_USER_VERBS_CMD_QUERY_PORT) |
9a4435375 oulijun         2016-07-21  467  		(1ULL << IB_USER_VERBS_CMD_ALLOC_PD) |
9a4435375 oulijun         2016-07-21  468  		(1ULL << IB_USER_VERBS_CMD_DEALLOC_PD) |
9a4435375 oulijun         2016-07-21  469  		(1ULL << IB_USER_VERBS_CMD_REG_MR) |
9a4435375 oulijun         2016-07-21  470  		(1ULL << IB_USER_VERBS_CMD_DEREG_MR) |
9a4435375 oulijun         2016-07-21  471  		(1ULL << IB_USER_VERBS_CMD_CREATE_COMP_CHANNEL) |
9a4435375 oulijun         2016-07-21  472  		(1ULL << IB_USER_VERBS_CMD_CREATE_CQ) |
9a4435375 oulijun         2016-07-21  473  		(1ULL << IB_USER_VERBS_CMD_DESTROY_CQ) |
9a4435375 oulijun         2016-07-21  474  		(1ULL << IB_USER_VERBS_CMD_CREATE_QP) |
9a4435375 oulijun         2016-07-21  475  		(1ULL << IB_USER_VERBS_CMD_MODIFY_QP) |
9a4435375 oulijun         2016-07-21  476  		(1ULL << IB_USER_VERBS_CMD_QUERY_QP) |
9a4435375 oulijun         2016-07-21  477  		(1ULL << IB_USER_VERBS_CMD_DESTROY_QP);
9a4435375 oulijun         2016-07-21  478  
df0651079 Lijun Ou        2018-07-25  479  	ib_dev->uverbs_ex_cmd_mask |=
df0651079 Lijun Ou        2018-07-25  480  		(1ULL << IB_USER_VERBS_EX_CMD_MODIFY_CQ);
df0651079 Lijun Ou        2018-07-25  481  
9a4435375 oulijun         2016-07-21  482  	/* HCA||device||port */
9a4435375 oulijun         2016-07-21  483  	ib_dev->modify_device		= hns_roce_modify_device;
9a4435375 oulijun         2016-07-21  484  	ib_dev->query_device		= hns_roce_query_device;
9a4435375 oulijun         2016-07-21  485  	ib_dev->query_port		= hns_roce_query_port;
9a4435375 oulijun         2016-07-21  486  	ib_dev->modify_port		= hns_roce_modify_port;
9a4435375 oulijun         2016-07-21  487  	ib_dev->get_link_layer		= hns_roce_get_link_layer;
2eefca272 Lijun Ou        2016-09-15  488  	ib_dev->get_netdev		= hns_roce_get_netdev;
825474697 Shaobo Xu       2016-11-23  489  	ib_dev->add_gid			= hns_roce_add_gid;
825474697 Shaobo Xu       2016-11-23  490  	ib_dev->del_gid			= hns_roce_del_gid;
9a4435375 oulijun         2016-07-21  491  	ib_dev->query_pkey		= hns_roce_query_pkey;
9a4435375 oulijun         2016-07-21  492  	ib_dev->alloc_ucontext		= hns_roce_alloc_ucontext;
9a4435375 oulijun         2016-07-21  493  	ib_dev->dealloc_ucontext	= hns_roce_dealloc_ucontext;
9a4435375 oulijun         2016-07-21  494  	ib_dev->mmap			= hns_roce_mmap;
9a4435375 oulijun         2016-07-21  495  
9a4435375 oulijun         2016-07-21  496  	/* PD */
9a4435375 oulijun         2016-07-21  497  	ib_dev->alloc_pd		= hns_roce_alloc_pd;
9a4435375 oulijun         2016-07-21 @498  	ib_dev->dealloc_pd		= hns_roce_dealloc_pd;
9a4435375 oulijun         2016-07-21  499  
9a4435375 oulijun         2016-07-21  500  	/* AH */
9a4435375 oulijun         2016-07-21  501  	ib_dev->create_ah		= hns_roce_create_ah;
9a4435375 oulijun         2016-07-21  502  	ib_dev->query_ah		= hns_roce_query_ah;
9a4435375 oulijun         2016-07-21  503  	ib_dev->destroy_ah		= hns_roce_destroy_ah;
9a4435375 oulijun         2016-07-21  504  
9a4435375 oulijun         2016-07-21  505  	/* QP */
9a4435375 oulijun         2016-07-21  506  	ib_dev->create_qp		= hns_roce_create_qp;
9a4435375 oulijun         2016-07-21  507  	ib_dev->modify_qp		= hns_roce_modify_qp;
9a4435375 oulijun         2016-07-21  508  	ib_dev->query_qp		= hr_dev->hw->query_qp;
9a4435375 oulijun         2016-07-21  509  	ib_dev->destroy_qp		= hr_dev->hw->destroy_qp;
9a4435375 oulijun         2016-07-21  510  	ib_dev->post_send		= hr_dev->hw->post_send;
9a4435375 oulijun         2016-07-21  511  	ib_dev->post_recv		= hr_dev->hw->post_recv;
9a4435375 oulijun         2016-07-21  512  
9a4435375 oulijun         2016-07-21  513  	/* CQ */
9a4435375 oulijun         2016-07-21  514  	ib_dev->create_cq		= hns_roce_ib_create_cq;
b156269d8 oulijun         2017-10-19  515  	ib_dev->modify_cq		= hr_dev->hw->modify_cq;
9a4435375 oulijun         2016-07-21  516  	ib_dev->destroy_cq		= hns_roce_ib_destroy_cq;
9a4435375 oulijun         2016-07-21  517  	ib_dev->req_notify_cq		= hr_dev->hw->req_notify_cq;
9a4435375 oulijun         2016-07-21  518  	ib_dev->poll_cq			= hr_dev->hw->poll_cq;
9a4435375 oulijun         2016-07-21  519  
9a4435375 oulijun         2016-07-21  520  	/* MR */
9a4435375 oulijun         2016-07-21  521  	ib_dev->get_dma_mr		= hns_roce_get_dma_mr;
9a4435375 oulijun         2016-07-21  522  	ib_dev->reg_user_mr		= hns_roce_reg_user_mr;
9a4435375 oulijun         2016-07-21  523  	ib_dev->dereg_mr		= hns_roce_dereg_mr;
a2c80b7b4 Wei Hu(Xavier   2017-10-26  524) 	if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_REREG_MR) {
a2c80b7b4 Wei Hu(Xavier   2017-10-26  525) 		ib_dev->rereg_user_mr	= hns_roce_rereg_user_mr;
a2c80b7b4 Wei Hu(Xavier   2017-10-26  526) 		ib_dev->uverbs_cmd_mask |= (1ULL << IB_USER_VERBS_CMD_REREG_MR);
a2c80b7b4 Wei Hu(Xavier   2017-10-26  527) 	}
9a4435375 oulijun         2016-07-21  528  
c7c281914 Yixian Liu      2018-09-23  529  	/* MW */
c7c281914 Yixian Liu      2018-09-23  530  	if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_MW) {
c7c281914 Yixian Liu      2018-09-23  531  		ib_dev->alloc_mw = hns_roce_alloc_mw;
c7c281914 Yixian Liu      2018-09-23  532  		ib_dev->dealloc_mw = hns_roce_dealloc_mw;
c7c281914 Yixian Liu      2018-09-23  533  		ib_dev->uverbs_cmd_mask |=
c7c281914 Yixian Liu      2018-09-23  534  					(1ULL << IB_USER_VERBS_CMD_ALLOC_MW) |
c7c281914 Yixian Liu      2018-09-23  535  					(1ULL << IB_USER_VERBS_CMD_DEALLOC_MW);
c7c281914 Yixian Liu      2018-09-23  536  	}
c7c281914 Yixian Liu      2018-09-23  537  
9a4435375 oulijun         2016-07-21  538  	/* OTHERS */
9a4435375 oulijun         2016-07-21  539  	ib_dev->get_port_immutable	= hns_roce_port_immutable;
fedc3abe7 Wei Hu(Xavier   2018-05-28  540) 	ib_dev->disassociate_ucontext	= hns_roce_disassociate_ucontext;
9a4435375 oulijun         2016-07-21  541  
0ede73bc0 Matan Barak     2018-03-19  542  	ib_dev->driver_id = RDMA_DRIVER_HNS;
e349f858d Jason Gunthorpe 2018-09-25  543  	ret = ib_register_device(ib_dev, "hns_%d", NULL);
9a4435375 oulijun         2016-07-21  544  	if (ret) {
9a4435375 oulijun         2016-07-21  545  		dev_err(dev, "ib_register_device failed!\n");
9a4435375 oulijun         2016-07-21  546  		return ret;
9a4435375 oulijun         2016-07-21  547  	}
9a4435375 oulijun         2016-07-21  548  
825474697 Shaobo Xu       2016-11-23  549  	ret = hns_roce_setup_mtu_mac(hr_dev);
9a4435375 oulijun         2016-07-21  550  	if (ret) {
825474697 Shaobo Xu       2016-11-23  551  		dev_err(dev, "setup_mtu_mac failed!\n");
825474697 Shaobo Xu       2016-11-23  552  		goto error_failed_setup_mtu_mac;
9a4435375 oulijun         2016-07-21  553  	}
9a4435375 oulijun         2016-07-21  554  
9a4435375 oulijun         2016-07-21  555  	iboe->nb.notifier_call = hns_roce_netdev_event;
9a4435375 oulijun         2016-07-21  556  	ret = register_netdevice_notifier(&iboe->nb);
9a4435375 oulijun         2016-07-21  557  	if (ret) {
9a4435375 oulijun         2016-07-21  558  		dev_err(dev, "register_netdevice_notifier failed!\n");
825474697 Shaobo Xu       2016-11-23  559  		goto error_failed_setup_mtu_mac;
9a4435375 oulijun         2016-07-21  560  	}
9a4435375 oulijun         2016-07-21  561  
cb7a94c9c Wei Hu(Xavier   2018-05-28  562) 	hr_dev->active = true;
9a4435375 oulijun         2016-07-21  563  	return 0;
9a4435375 oulijun         2016-07-21  564  
825474697 Shaobo Xu       2016-11-23  565  error_failed_setup_mtu_mac:
9a4435375 oulijun         2016-07-21  566  	ib_unregister_device(ib_dev);
9a4435375 oulijun         2016-07-21  567  
9a4435375 oulijun         2016-07-21  568  	return ret;
9a4435375 oulijun         2016-07-21  569  }
9a4435375 oulijun         2016-07-21  570  

:::::: The code at line 498 was first introduced by commit
:::::: 9a4435375cd151e07c0c38fa601b00115986091b IB/hns: Add driver files for hns RoCE driver

:::::: TO: oulijun <oulijun@xxxxxxxxxx>
:::::: CC: Doug Ledford <dledford@xxxxxxxxxx>

---
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