* [rdma:wip/leon-for-next 12/12] drivers/infiniband/hw/hns/hns_roce_hw_v2.c:4864:13: warning: unused variable 'sl_num'
@ 2024-04-08 16:14 kernel test robot
2024-04-09 7:28 ` Leon Romanovsky
0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2024-04-08 16:14 UTC (permalink / raw)
To: Junxian Huang
Cc: oe-kbuild-all, Doug Ledford, Jason Gunthorpe, linux-rdma,
Leon Romanovsky
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@intel.com/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@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/202404090005.YRqvDvXD-lkp@intel.com/
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [rdma:wip/leon-for-next 12/12] drivers/infiniband/hw/hns/hns_roce_hw_v2.c:4864:13: warning: unused variable 'sl_num'
2024-04-08 16:14 [rdma:wip/leon-for-next 12/12] drivers/infiniband/hw/hns/hns_roce_hw_v2.c:4864:13: warning: unused variable 'sl_num' kernel test robot
@ 2024-04-09 7:28 ` Leon Romanovsky
0 siblings, 0 replies; 2+ messages in thread
From: Leon Romanovsky @ 2024-04-09 7:28 UTC (permalink / raw)
To: kernel test robot
Cc: Junxian Huang, oe-kbuild-all, Doug Ledford, Jason Gunthorpe,
linux-rdma
On Tue, Apr 09, 2024 at 12:14:20AM +0800, kernel test robot wrote:
> 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@intel.com/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@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/202404090005.YRqvDvXD-lkp@intel.com/
>
> 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;
> | ^~~~~~
>
Thanks for the report, fixed.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-04-09 7:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-08 16:14 [rdma:wip/leon-for-next 12/12] drivers/infiniband/hw/hns/hns_roce_hw_v2.c:4864:13: warning: unused variable 'sl_num' kernel test robot
2024-04-09 7:28 ` Leon Romanovsky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox