drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:4765:55: sparse: sparse: incorrect type in argument 3 (different base types)
From: kernel test robot
Date: Thu Mar 03 2022 - 07:03:03 EST
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 5859a2b1991101d6b978f3feb5325dad39421f29
commit: 1813ee52433103d389da7c9c7ee5f81d113d9566 net: hns3: refactor PF rss set APIs with new common rss set APIs
date: 8 weeks ago
config: ia64-randconfig-s031-20220303 (https://download.01.org/0day-ci/archive/20220303/202203032008.59zQWB3h-lkp@xxxxxxxxx/config)
compiler: ia64-linux-gcc (GCC) 11.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1813ee52433103d389da7c9c7ee5f81d113d9566
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 1813ee52433103d389da7c9c7ee5f81d113d9566
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=ia64 SHELL=/bin/bash drivers/net/ethernet/hisilicon/hns3/ drivers/net/wwan/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>
sparse warnings: (new ones prefixed by >>)
>> drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:4765:55: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected restricted __le16 [usertype] rss_ind_tbl_size @@ got unsigned short [usertype] rss_ind_tbl_size @@
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:4765:55: sparse: expected restricted __le16 [usertype] rss_ind_tbl_size
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:4765:55: sparse: got unsigned short [usertype] rss_ind_tbl_size
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:5347:31: sparse: sparse: context imbalance in 'hclge_sync_fd_user_def_cfg' - unexpected unlock
vim +4765 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
4754
4755 static int hclge_get_rss(struct hnae3_handle *handle, u32 *indir,
4756 u8 *key, u8 *hfunc)
4757 {
4758 struct hnae3_ae_dev *ae_dev = pci_get_drvdata(handle->pdev);
4759 struct hclge_vport *vport = hclge_get_vport(handle);
4760 struct hclge_comm_rss_cfg *rss_cfg = &vport->back->rss_cfg;
4761
4762 hclge_comm_get_rss_hash_info(rss_cfg, key, hfunc);
4763
4764 hclge_comm_get_rss_indir_tbl(rss_cfg, indir,
> 4765 ae_dev->dev_specs.rss_ind_tbl_size);
4766
4767 return 0;
4768 }
4769
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx