[linux-next:master 4857/10848] drivers/infiniband/hw/irdma/verbs.c:584: warning: Function parameter or member 'udata' not described in 'irdma_setup_umode_qp'

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

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   47762f08697484cf0c2f2904b8c52375ed26c8cb
commit: 3a8498720450174b8db450d3375a04dca81b3534 [4857/10848] RDMA/irdma: Allow accurate reporting on QP max send/recv WR
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20230817/202308171620.m4MNACWz-lkp@xxxxxxxxx/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce: (https://download.01.org/0day-ci/archive/20230817/202308171620.m4MNACWz-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202308171620.m4MNACWz-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

>> drivers/infiniband/hw/irdma/verbs.c:584: warning: Function parameter or member 'udata' not described in 'irdma_setup_umode_qp'


vim +584 drivers/infiniband/hw/irdma/verbs.c

   571	
   572	/**
   573	 * irdma_setup_umode_qp - setup sq and rq size in user mode qp
   574	 * @iwdev: iwarp device
   575	 * @iwqp: qp ptr (user or kernel)
   576	 * @info: initialize info to return
   577	 * @init_attr: Initial QP create attributes
   578	 */
   579	static int irdma_setup_umode_qp(struct ib_udata *udata,
   580					struct irdma_device *iwdev,
   581					struct irdma_qp *iwqp,
   582					struct irdma_qp_init_info *info,
   583					struct ib_qp_init_attr *init_attr)
 > 584	{
   585		struct irdma_ucontext *ucontext = rdma_udata_to_drv_context(udata,
   586					struct irdma_ucontext, ibucontext);
   587		struct irdma_qp_uk_init_info *ukinfo = &info->qp_uk_init_info;
   588		struct irdma_create_qp_req req;
   589		unsigned long flags;
   590		int ret;
   591	
   592		ret = ib_copy_from_udata(&req, udata,
   593					 min(sizeof(req), udata->inlen));
   594		if (ret) {
   595			ibdev_dbg(&iwdev->ibdev, "VERBS: ib_copy_from_data fail\n");
   596			return ret;
   597		}
   598	
   599		iwqp->ctx_info.qp_compl_ctx = req.user_compl_ctx;
   600		iwqp->user_mode = 1;
   601		if (req.user_wqe_bufs) {
   602			info->qp_uk_init_info.legacy_mode = ucontext->legacy_mode;
   603			spin_lock_irqsave(&ucontext->qp_reg_mem_list_lock, flags);
   604			iwqp->iwpbl = irdma_get_pbl((unsigned long)req.user_wqe_bufs,
   605						    &ucontext->qp_reg_mem_list);
   606			spin_unlock_irqrestore(&ucontext->qp_reg_mem_list_lock, flags);
   607	
   608			if (!iwqp->iwpbl) {
   609				ret = -ENODATA;
   610				ibdev_dbg(&iwdev->ibdev, "VERBS: no pbl info\n");
   611				return ret;
   612			}
   613		}
   614	
   615		if (!ucontext->use_raw_attrs) {
   616			/**
   617			 * Maintain backward compat with older ABI which passes sq and
   618			 * rq depth in quanta in cap.max_send_wr and cap.max_recv_wr.
   619			 * There is no way to compute the correct value of
   620			 * iwqp->max_send_wr/max_recv_wr in the kernel.
   621			 */
   622			iwqp->max_send_wr = init_attr->cap.max_send_wr;
   623			iwqp->max_recv_wr = init_attr->cap.max_recv_wr;
   624			ukinfo->sq_size = init_attr->cap.max_send_wr;
   625			ukinfo->rq_size = init_attr->cap.max_recv_wr;
   626			irdma_uk_calc_shift_wq(ukinfo, &ukinfo->sq_shift,
   627					       &ukinfo->rq_shift);
   628		} else {
   629			ret = irdma_uk_calc_depth_shift_sq(ukinfo, &ukinfo->sq_depth,
   630							   &ukinfo->sq_shift);
   631			if (ret)
   632				return ret;
   633	
   634			ret = irdma_uk_calc_depth_shift_rq(ukinfo, &ukinfo->rq_depth,
   635							   &ukinfo->rq_shift);
   636			if (ret)
   637				return ret;
   638	
   639			iwqp->max_send_wr =
   640				(ukinfo->sq_depth - IRDMA_SQ_RSVD) >> ukinfo->sq_shift;
   641			iwqp->max_recv_wr =
   642				(ukinfo->rq_depth - IRDMA_RQ_RSVD) >> ukinfo->rq_shift;
   643			ukinfo->sq_size = ukinfo->sq_depth >> ukinfo->sq_shift;
   644			ukinfo->rq_size = ukinfo->rq_depth >> ukinfo->rq_shift;
   645		}
   646	
   647		irdma_setup_virt_qp(iwdev, iwqp, info);
   648	
   649		return 0;
   650	}
   651	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux