[<prev] [next>] [day] [month] [year] [list]
Message-ID: <201904151147.HAA6uw5u%lkp@intel.com>
Date: Mon, 15 Apr 2019 11:45:48 +0800
From: kbuild test robot <lkp@...el.com>
To: Jian Shen <shenjian15@...wei.com>
Cc: kbuild-all@...org, netdev@...r.kernel.org,
Huazhong Tan <tanhuazhong@...wei.com>
Subject: [net-next:master 709/723]
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:6975:63: sparse:
incorrect type in argument 2 (different base types)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master
head: e62b2fd5d3b4c5c958cf88b92f31960750d88dc5
commit: 21e043cd812492e0a02fbbd956fbe49e19daeb45 [709/723] net: hns3: fix set port based VLAN for PF
reproduce:
# apt-get install sparse
git checkout 21e043cd812492e0a02fbbd956fbe49e19daeb45
make ARCH=x86_64 allmodconfig
make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
sparse warnings: (new ones prefixed by >>)
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:294:34: sparse: cast from restricted __be32
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:295:34: sparse: cast from restricted __be16
include/linux/slab.h:666:13: sparse: undefined identifier '__builtin_mul_overflow'
include/linux/device.h:686:13: sparse: undefined identifier '__builtin_mul_overflow'
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:1218:27: sparse: expression using sizeof(void)
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:1218:27: sparse: expression using sizeof(void)
include/linux/device.h:686:13: sparse: not a function <noident>
include/linux/device.h:686:13: sparse: not a function <noident>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:1528:22: sparse: expression using sizeof(void)
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:1528:22: sparse: expression using sizeof(void)
include/linux/device.h:686:13: sparse: not a function <noident>
include/linux/device.h:686:13: sparse: not a function <noident>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:2276:16: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [unsigned] [usertype] <noident> @@ got ed int [unsigned] [usertype] <noident> @@
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:2276:16: expected unsigned int [unsigned] [usertype] <noident>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:2276:16: got restricted __le32 [usertype] sfp_speed
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:3221:22: sparse: expression using sizeof(void)
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:3221:22: sparse: expression using sizeof(void)
>> drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:6975:63: sparse: incorrect type in argument 2 (different base types) @@ expected restricted __be16 [usertype] proto @@ got unsignedrestricted __be16 [usertype] proto @@
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:6975:63: expected restricted __be16 [usertype] proto
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:6975:63: got unsigned short [unsigned] [usertype] vlan_proto
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:6983:67: sparse: incorrect type in argument 2 (different base types) @@ expected restricted __be16 [usertype] proto @@ got unsignedrestricted __be16 [usertype] proto @@
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:6983:67: expected restricted __be16 [usertype] proto
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:6983:67: got unsigned short [unsigned] [usertype] vlan_proto
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:7136:24: sparse: expression using sizeof(void)
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:8080:16: sparse: expression using sizeof(void)
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:8080:16: sparse: expression using sizeof(void)
include/linux/slab.h:666:13: sparse: not a function <noident>
include/linux/slab.h:666:13: sparse: not a function <noident>
include/linux/slab.h:666:13: sparse: not a function <noident>
include/linux/slab.h:666:13: sparse: call with no type!
include/linux/device.h:686:13: sparse: call with no type!
vim +6975 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
6958
6959 int hclge_update_port_base_vlan_cfg(struct hclge_vport *vport, u16 state,
6960 struct hclge_vlan_info *vlan_info)
6961 {
6962 struct hnae3_handle *nic = &vport->nic;
6963 struct hclge_vlan_info *old_vlan_info;
6964 struct hclge_dev *hdev = vport->back;
6965 int ret;
6966
6967 old_vlan_info = &vport->port_base_vlan_cfg.vlan_info;
6968
6969 ret = hclge_vlan_offload_cfg(vport, state, vlan_info->vlan_tag);
6970 if (ret)
6971 return ret;
6972
6973 if (state == HNAE3_PORT_BASE_VLAN_MODIFY) {
6974 /* add new VLAN tag */
> 6975 ret = hclge_set_vlan_filter_hw(hdev, vlan_info->vlan_proto,
6976 vport->vport_id,
6977 vlan_info->vlan_tag,
6978 vlan_info->qos, false);
6979 if (ret)
6980 return ret;
6981
6982 /* remove old VLAN tag */
6983 ret = hclge_set_vlan_filter_hw(hdev, old_vlan_info->vlan_proto,
6984 vport->vport_id,
6985 old_vlan_info->vlan_tag,
6986 old_vlan_info->qos, true);
6987 if (ret)
6988 return ret;
6989
6990 goto update;
6991 }
6992
6993 ret = hclge_update_vlan_filter_entries(vport, state, vlan_info,
6994 old_vlan_info);
6995 if (ret)
6996 return ret;
6997
6998 /* update state only when disable/enable port based VLAN */
6999 vport->port_base_vlan_cfg.state = state;
7000 if (state == HNAE3_PORT_BASE_VLAN_DISABLE)
7001 nic->port_base_vlan_state = HNAE3_PORT_BASE_VLAN_DISABLE;
7002 else
7003 nic->port_base_vlan_state = HNAE3_PORT_BASE_VLAN_ENABLE;
7004
7005 update:
7006 vport->port_base_vlan_cfg.vlan_info.vlan_tag = vlan_info->vlan_tag;
7007 vport->port_base_vlan_cfg.vlan_info.qos = vlan_info->qos;
7008 vport->port_base_vlan_cfg.vlan_info.vlan_proto = vlan_info->vlan_proto;
7009
7010 return 0;
7011 }
7012
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Powered by blists - more mailing lists