Re: [PATCH rdma-next 4/4] RDMA/bnxt_re: Direct Verbs: Support CQ and QP verbs

kernel test robot
2025-11-04T05:00:11Z

Hi Sriharsha,

kernel test robot noticed the following build warnings:

[auto build test WARNING on rdma/for-next]
[also build test WARNING on linus/master v6.18-rc4 next-20251103]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url: https://github.com/intel-lab-lkp/linux/commits/Sriharsha-Basavapatna/RDMA-bnxt_re-Move-the-UAPI-methods-to-a-dedicated-file/20251103-190151
base: https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git for-next
patch link: https://lore.kernel.org/r/20251103105033.205586-5-sriharsha.basavapatna%40broadcom.com
patch subject: [PATCH rdma-next 4/4] RDMA/bnxt_re: Direct Verbs: Support CQ and QP verbs
config: x86_64-rhel-9.4-ltp (https://download.01.org/0day-ci/archive/20251104/202511041217.opx35mPp-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251104/202511041217.opx35mPp-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202511041217.opx35mPp-lkp@intel.com/

All warnings (new ones prefixed by >>):

drivers/infiniband/hw/bnxt_re/dv.c: In function 'bnxt_re_handler_BNXT_RE_METHOD_DBR_QUERY':
drivers/infiniband/hw/bnxt_re/dv.c:635:29: warning: variable 'rdev' set but not used [-Wunused-but-set-variable]
635 | struct bnxt_re_dev *rdev;
| ^~~~
drivers/infiniband/hw/bnxt_re/dv.c: In function 'bnxt_re_dv_init_user_qp':
>> drivers/infiniband/hw/bnxt_re/dv.c:1105:34: warning: variable 'cntx' set but not used [-Wunused-but-set-variable]
1105 | struct bnxt_re_ucontext *cntx;
| ^~~~

vim +/cntx +1105 drivers/infiniband/hw/bnxt_re/dv.c

1093
1094 static int bnxt_re_dv_init_user_qp(struct bnxt_re_dev *rdev,
1095 struct ib_ucontext *context,
1096 struct bnxt_re_qp *qp,
1097 struct bnxt_re_srq *srq,
1098 struct bnxt_re_dv_create_qp_req *init_attr,
1099 struct bnxt_re_dv_umem *sq_umem,
1100 struct bnxt_re_dv_umem *rq_umem)
1101 {
1102 struct bnxt_qplib_sg_info *sginfo;
1103 struct bnxt_re_dv_umem *dv_umem;
1104 struct bnxt_qplib_qp *qplib_qp;
> 1105 struct bnxt_re_ucontext *cntx;
1106 struct ib_umem *umem;
1107 int rc = -EINVAL;
1108
1109 if (!sq_umem || (!srq && !rq_umem))
1110 return rc;
1111
1112 qplib_qp = &qp->qplib_qp;
1113 cntx = container_of(context, struct bnxt_re_ucontext, ib_uctx);
1114 qplib_qp->qp_handle = init_attr->qp_handle;
1115 sginfo = &qplib_qp->sq.sg_info;
1116
1117 /* SQ */
1118 dv_umem = bnxt_re_dv_umem_get(rdev, context, sq_umem,
1119 init_attr->sq_umem_offset,
1120 init_attr->sq_len, sginfo);
1121 if (IS_ERR(dv_umem)) {
1122 rc = PTR_ERR(dv_umem);
1123 dev_err(rdev_to_dev(rdev), "%s: bnxt_re_dv_umem_get() failed! rc = %d\n",
1124 __func__, rc);
1125 return rc;
1126 }
1127 qp->sq_umem = dv_umem;
1128 qp->sumem = dv_umem->umem;
1129 dev_dbg(rdev_to_dev(rdev),
1130 "%s: umem: 0x%llx npages: %d page_size: %d page_shift: %d\n",
1131 __func__, (u64)umem, sginfo->npages, sginfo->pgsize, sginfo->pgshft);
1132
1133 /* SRQ */
1134 if (srq) {
1135 qplib_qp->srq = &srq->qplib_srq;
1136 goto done;
1137 }
1138
1139 /* RQ */
1140 sginfo = &qplib_qp->rq.sg_info;
1141 dv_umem = bnxt_re_dv_umem_get(rdev, context, rq_umem,
1142 init_attr->rq_umem_offset,
1143 init_attr->rq_len, sginfo);
1144 if (IS_ERR(dv_umem)) {
1145 rc = PTR_ERR(dv_umem);
1146 dev_err(rdev_to_dev(rdev), "%s: bnxt_re_dv_umem_get() failed! rc = %d\n",
1147 __func__, rc);
1148 goto rqfail;
1149 }
1150 qp->rq_umem = dv_umem;
1151 qp->rumem = dv_umem->umem;
1152 dev_dbg(rdev_to_dev(rdev),
1153 "%s: umem: 0x%llx npages: %d page_size: %d page_shift: %d\n",
1154 __func__, (u64)umem, sginfo->npages, sginfo->pgsize, sginfo->pgshft);
1155
1156 done:
1157 qplib_qp->is_user = true;
1158 return 0;
1159 rqfail:
1160 ib_umem_release(qp->sumem);
1161 kfree(qp->sq_umem);
1162 qplib_qp->sq.sg_info.umem = NULL;
1163 return rc;
1164 }
1165

--
0-DAY CI Kernel Test Service