tree: https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git wip/leon-for-next head: c3236d538646c8e333370d71cb1d1e37e8996eaf commit: c3236d538646c8e333370d71cb1d1e37e8996eaf [12/12] RDMA/hns: Support DSCP config: s390-allyesconfig (https://download.01.org/0day-ci/archive/20240409/202404090005.YRqvDvXD-lkp@xxxxxxxxx/config) compiler: s390-linux-gcc (GCC) 13.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240409/202404090005.YRqvDvXD-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/202404090005.YRqvDvXD-lkp@xxxxxxxxx/ All warnings (new ones prefixed by >>): drivers/infiniband/hw/hns/hns_roce_hw_v2.c: In function 'hns_roce_set_sl': >> drivers/infiniband/hw/hns/hns_roce_hw_v2.c:4864:13: warning: unused variable 'sl_num' [-Wunused-variable] 4864 | u32 sl_num; | ^~~~~~ -- drivers/infiniband/hw/hns/hns_roce_ah.c: In function 'hns_roce_create_ah': >> drivers/infiniband/hw/hns/hns_roce_ah.c:65:13: warning: unused variable 'max_sl' [-Wunused-variable] 65 | u32 max_sl; | ^~~~~~ vim +/sl_num +4864 drivers/infiniband/hw/hns/hns_roce_hw_v2.c 4854 4855 static int hns_roce_set_sl(struct ib_qp *ibqp, 4856 const struct ib_qp_attr *attr, 4857 struct hns_roce_v2_qp_context *context, 4858 struct hns_roce_v2_qp_context *qpc_mask) 4859 { 4860 const struct ib_global_route *grh = rdma_ah_read_grh(&attr->ah_attr); 4861 struct hns_roce_dev *hr_dev = to_hr_dev(ibqp->device); 4862 struct hns_roce_qp *hr_qp = to_hr_qp(ibqp); 4863 struct ib_device *ibdev = &hr_dev->ib_dev; > 4864 u32 sl_num; 4865 int ret; 4866 4867 ret = hns_roce_hw_v2_get_dscp(hr_dev, get_tclass(&attr->ah_attr.grh), 4868 &hr_qp->tc_mode, &hr_qp->priority); 4869 if (ret && ret != -EOPNOTSUPP && 4870 grh->sgid_attr->gid_type == IB_GID_TYPE_ROCE_UDP_ENCAP) { 4871 ibdev_err_ratelimited(ibdev, 4872 "failed to get dscp, ret = %d.\n", ret); 4873 return ret; 4874 } 4875 4876 if (hr_qp->tc_mode == HNAE3_TC_MAP_MODE_DSCP && 4877 grh->sgid_attr->gid_type == IB_GID_TYPE_ROCE_UDP_ENCAP) 4878 hr_qp->sl = hr_qp->priority; 4879 else 4880 hr_qp->sl = rdma_ah_get_sl(&attr->ah_attr); 4881 4882 if (!check_sl_valid(hr_dev, hr_qp->sl)) 4883 return -EINVAL; 4884 4885 hr_reg_write(context, QPC_SL, hr_qp->sl); 4886 hr_reg_clear(qpc_mask, QPC_SL); 4887 4888 return 0; 4889 } 4890 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki