Linux-RDMA Archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Junxian Huang <huangjunxian6@hisilicon.com>
Cc: oe-kbuild-all@lists.linux.dev, Doug Ledford <dledford@redhat.com>,
	Jason Gunthorpe <jgg+lists@ziepe.ca>,
	linux-rdma@vger.kernel.org, Leon Romanovsky <leon@kernel.org>
Subject: [rdma:wip/leon-for-next 12/12] drivers/infiniband/hw/hns/hns_roce_hw_v2.c:4864:13: warning: unused variable 'sl_num'
Date: Tue, 9 Apr 2024 00:14:20 +0800	[thread overview]
Message-ID: <202404090005.YRqvDvXD-lkp@intel.com> (raw)

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

             reply	other threads:[~2024-04-08 16:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-08 16:14 kernel test robot [this message]
2024-04-09  7:28 ` [rdma:wip/leon-for-next 12/12] drivers/infiniband/hw/hns/hns_roce_hw_v2.c:4864:13: warning: unused variable 'sl_num' Leon Romanovsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202404090005.YRqvDvXD-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=dledford@redhat.com \
    --cc=huangjunxian6@hisilicon.com \
    --cc=jgg+lists@ziepe.ca \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).