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

kernel test robot
2025-11-04T03:46:47Z

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: s390-allmodconfig (https://download.01.org/0day-ci/archive/20251104/202511041131.c3AuE5DZ-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251104/202511041131.c3AuE5DZ-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/202511041131.c3AuE5DZ-lkp@intel.com/

All warnings (new ones prefixed by >>):

drivers/infiniband/hw/bnxt_re/dv.c:635:22: warning: variable 'rdev' set but not used [-Wunused-but-set-variable]
635 | struct bnxt_re_dev *rdev;
| ^
>> drivers/infiniband/hw/bnxt_re/dv.c:891:30: warning: variable 'ib_cq' is uninitialized when used here [-Wuninitialized]
891 | bnxt_re_dv_init_ib_cq(rdev, ib_cq, re_cq);
| ^~~~~
drivers/infiniband/hw/bnxt_re/dv.c:835:21: note: initialize the variable 'ib_cq' to silence this warning
835 | struct ib_cq *ib_cq;
| ^
| = NULL
drivers/infiniband/hw/bnxt_re/dv.c:1105:27: warning: variable 'cntx' set but not used [-Wunused-but-set-variable]
1105 | struct bnxt_re_ucontext *cntx;
| ^
>> drivers/infiniband/hw/bnxt_re/dv.c:1131:18: warning: variable 'umem' is uninitialized when used here [-Wuninitialized]
1131 | __func__, (u64)umem, sginfo->npages, sginfo->pgsize, sginfo->pgshft);
| ^~~~
include/linux/dev_printk.h:165:39: note: expanded from macro 'dev_dbg'
165 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~
include/linux/dynamic_debug.h:274:19: note: expanded from macro 'dynamic_dev_dbg'
274 | dev, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~
include/linux/dynamic_debug.h:250:59: note: expanded from macro '_dynamic_func_call'
250 | _dynamic_func_call_cls(_DPRINTK_CLASS_DFLT, fmt, func, ##__VA_ARGS__)
| ^~~~~~~~~~~
include/linux/dynamic_debug.h:248:65: note: expanded from macro '_dynamic_func_call_cls'
248 | __dynamic_func_call_cls(__UNIQUE_ID(ddebug), cls, fmt, func, ##__VA_ARGS__)
| ^~~~~~~~~~~
include/linux/dynamic_debug.h:224:15: note: expanded from macro '__dynamic_func_call_cls'
224 | func(&id, ##__VA_ARGS__); \
| ^~~~~~~~~~~
drivers/infiniband/hw/bnxt_re/dv.c:1106:22: note: initialize the variable 'umem' to silence this warning
1106 | struct ib_umem *umem;
| ^
| = NULL
4 warnings generated.

vim +/ib_cq +891 drivers/infiniband/hw/bnxt_re/dv.c

823
824 static int UVERBS_HANDLER(BNXT_RE_METHOD_DV_CREATE_CQ)(struct uverbs_attr_bundle *attrs)
825 {
826 struct ib_uobject *uobj =
827 uverbs_attr_get_uobject(attrs, BNXT_RE_DV_CREATE_CQ_HANDLE);
828 struct bnxt_re_dv_umem *umem_handle = NULL;
829 struct bnxt_re_dv_cq_resp resp = {};
830 struct bnxt_re_dv_cq_req req = {};
831 struct bnxt_re_ucontext *re_uctx;
832 struct ib_ucontext *ib_uctx;
833 struct bnxt_re_dev *rdev;
834 struct bnxt_re_cq *re_cq;
835 struct ib_cq *ib_cq;
836 u64 offset;
837 int ret;
838
839 ib_uctx = ib_uverbs_get_ucontext(attrs);
840 if (IS_ERR(ib_uctx))
841 return PTR_ERR(ib_uctx);
842
843 re_uctx = container_of(ib_uctx, struct bnxt_re_ucontext, ib_uctx);
844 rdev = re_uctx->rdev;
845
846 ret = uverbs_copy_from_or_zero(&req, attrs, BNXT_RE_DV_CREATE_CQ_REQ);
847 if (ret) {
848 dev_err(rdev_to_dev(rdev), "%s: Failed to copy request: %d\n",
849 __func__, ret);
850 return ret;
851 }
852
853 umem_handle = uverbs_attr_get_obj(attrs, BNXT_RE_DV_CREATE_CQ_UMEM_HANDLE);
854 if (IS_ERR(umem_handle)) {
855 dev_err(rdev_to_dev(rdev),
856 "%s: BNXT_RE_DV_CREATE_CQ_UMEM_HANDLE is not valid\n",
857 __func__);
858 return PTR_ERR(umem_handle);
859 }
860
861 ret = uverbs_copy_from(&offset, attrs, BNXT_RE_DV_CREATE_CQ_UMEM_OFFSET);
862 if (ret) {
863 dev_err(rdev_to_dev(rdev), "%s: Failed to copy umem offset: %d\n",
864 __func__, ret);
865 return ret;
866 }
867
868 re_cq = bnxt_re_dv_create_qplib_cq(rdev, re_uctx, &req, umem_handle, offset);
869 if (!re_cq) {
870 dev_err(rdev_to_dev(rdev), "%s: Failed to create qplib cq\n",
871 __func__);
872 return -EIO;
873 }
874
875 ret = bnxt_re_dv_create_cq_resp(rdev, re_cq, &resp);
876 if (ret) {
877 dev_err(rdev_to_dev(rdev),
878 "%s: Failed to create cq response\n", __func__);
879 goto fail_resp;
880 }
881
882 ret = bnxt_re_dv_uverbs_copy_to(rdev, attrs, BNXT_RE_DV_CREATE_CQ_RESP,
883 &resp, sizeof(resp));
884 if (ret) {
885 dev_err(rdev_to_dev(rdev),
886 "%s: Failed to copy cq response: %d\n", __func__, ret);
887 goto fail_resp;
888 }
889
890 bnxt_re_dv_finalize_uobj(uobj, re_cq, attrs, BNXT_RE_DV_CREATE_CQ_HANDLE);
> 891 bnxt_re_dv_init_ib_cq(rdev, ib_cq, re_cq);
892 re_cq->is_dv_cq = true;
893 atomic_inc(&rdev->dv_cq_count);
894
895 dev_dbg(rdev_to_dev(rdev), "%s: Created CQ: 0x%llx, handle: 0x%x\n",
896 __func__, (u64)re_cq, uobj->id);
897
898 return 0;
899
900 fail_resp:
901 bnxt_qplib_destroy_cq(&rdev->qplib_res, &re_cq->qplib_cq);
902 bnxt_re_put_nq(rdev, re_cq->qplib_cq.nq);
903 if (re_cq->umem_handle) {
904 ib_umem_release(re_cq->umem);
905 kfree(re_cq->umem_handle);
906 }
907 kfree(re_cq);
908 return ret;
909 };
910

--
0-DAY CI Kernel Test Service