lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202006052038.nVsr2rN2%lkp@intel.com>
Date:   Fri, 5 Jun 2020 20:10:41 +0800
From:   kernel test robot <lkp@...el.com>
To:     Luo bin <luobin9@...wei.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: drivers/net/ethernet/huawei/hinic/hinic_sriov.c:477:6: warning:
 variable 'func_id' set but not used

Hi Luo,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   435faf5c218a47fd6258187f62d9bb1009717896
commit: 7dd29ee128654702bd493ecec0bb22c2c5f0f395 hinic: add sriov feature support
date:   6 weeks ago
config: i386-randconfig-r013-20200605 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce (this is a W=1 build):
        git checkout 7dd29ee128654702bd493ecec0bb22c2c5f0f395
        # save the attached .config to linux build tree
        make W=1 ARCH=i386 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>

All warnings (new ones prefixed by >>, old ones prefixed by <<):

drivers/net/ethernet/huawei/hinic/hinic_sriov.c:26:5: warning: no previous prototype for 'hinic_set_mac' [-Wmissing-prototypes]
26 | int hinic_set_mac(struct hinic_hwdev *hwdev, const u8 *mac_addr, u16 vlan_id,
|     ^~~~~~~~~~~~~
drivers/net/ethernet/huawei/hinic/hinic_sriov.c:87:5: warning: no previous prototype for 'hinic_vf_info_vlanprio' [-Wmissing-prototypes]
87 | u16 hinic_vf_info_vlanprio(struct hinic_hwdev *hwdev, int vf_id)
|     ^~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/huawei/hinic/hinic_sriov.c:100:5: warning: no previous prototype for 'hinic_set_vf_vlan' [-Wmissing-prototypes]
100 | int hinic_set_vf_vlan(struct hinic_hwdev *hwdev, bool add, u16 vid,
|     ^~~~~~~~~~~~~~~~~
drivers/net/ethernet/huawei/hinic/hinic_sriov.c:166:5: warning: no previous prototype for 'hinic_register_vf_msg_handler' [-Wmissing-prototypes]
166 | int hinic_register_vf_msg_handler(void *hwdev, u16 vf_id,
|     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/huawei/hinic/hinic_sriov.c:195:5: warning: no previous prototype for 'hinic_unregister_vf_msg_handler' [-Wmissing-prototypes]
195 | int hinic_unregister_vf_msg_handler(void *hwdev, u16 vf_id,
|     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/huawei/hinic/hinic_sriov.c:212:5: warning: no previous prototype for 'hinic_change_vf_mtu_msg_handler' [-Wmissing-prototypes]
212 | int hinic_change_vf_mtu_msg_handler(void *hwdev, u16 vf_id,
|     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/huawei/hinic/hinic_sriov.c:230:5: warning: no previous prototype for 'hinic_get_vf_mac_msg_handler' [-Wmissing-prototypes]
230 | int hinic_get_vf_mac_msg_handler(void *hwdev, u16 vf_id,
|     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/huawei/hinic/hinic_sriov.c:249:5: warning: no previous prototype for 'hinic_set_vf_mac_msg_handler' [-Wmissing-prototypes]
249 | int hinic_set_vf_mac_msg_handler(void *hwdev, u16 vf_id,
|     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/huawei/hinic/hinic_sriov.c:283:5: warning: no previous prototype for 'hinic_del_vf_mac_msg_handler' [-Wmissing-prototypes]
283 | int hinic_del_vf_mac_msg_handler(void *hwdev, u16 vf_id,
|     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/huawei/hinic/hinic_sriov.c:315:5: warning: no previous prototype for 'hinic_get_vf_link_status_msg_handler' [-Wmissing-prototypes]
315 | int hinic_get_vf_link_status_msg_handler(void *hwdev, u16 vf_id,
|     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/huawei/hinic/hinic_sriov.c:354:26: warning: no previous prototype for 'hinic_get_sriov_info_by_pcidev' [-Wmissing-prototypes]
354 | struct hinic_sriov_info *hinic_get_sriov_info_by_pcidev(struct pci_dev *pdev)
|                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/huawei/hinic/hinic_sriov.c:362:5: warning: no previous prototype for 'hinic_kill_vf_vlan' [-Wmissing-prototypes]
362 | int hinic_kill_vf_vlan(struct hinic_hwdev *hwdev, int vf_id)
|     ^~~~~~~~~~~~~~~~~~
drivers/net/ethernet/huawei/hinic/hinic_sriov.c:385:5: warning: no previous prototype for 'nic_pf_mbox_handler' [-Wmissing-prototypes]
385 | int nic_pf_mbox_handler(void *hwdev, u16 vf_id, u8 cmd, void *buf_in,
|     ^~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/huawei/hinic/hinic_sriov.c:474:6: warning: no previous prototype for 'hinic_clear_vf_infos' [-Wmissing-prototypes]
474 | void hinic_clear_vf_infos(struct hinic_dev *nic_dev, u16 vf_id)
|      ^~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/huawei/hinic/hinic_sriov.c: In function 'hinic_clear_vf_infos':
>> drivers/net/ethernet/huawei/hinic/hinic_sriov.c:477:6: warning: variable 'func_id' set but not used [-Wunused-but-set-variable]
477 |  u16 func_id;
|      ^~~~~~~
drivers/net/ethernet/huawei/hinic/hinic_sriov.c: At top level:
drivers/net/ethernet/huawei/hinic/hinic_sriov.c:492:5: warning: no previous prototype for 'hinic_deinit_vf_hw' [-Wmissing-prototypes]
492 | int hinic_deinit_vf_hw(struct hinic_sriov_info *sriov_info, u16 start_vf_id,
|     ^~~~~~~~~~~~~~~~~~
drivers/net/ethernet/huawei/hinic/hinic_sriov.c:593:5: warning: no previous prototype for 'hinic_init_vf_hw' [-Wmissing-prototypes]
593 | int hinic_init_vf_hw(struct hinic_hwdev *hwdev, u16 start_vf_id, u16 end_vf_id)
|     ^~~~~~~~~~~~~~~~

vim +/func_id +477 drivers/net/ethernet/huawei/hinic/hinic_sriov.c

   473	
   474	void hinic_clear_vf_infos(struct hinic_dev *nic_dev, u16 vf_id)
   475	{
   476		struct vf_data_storage *vf_infos;
 > 477		u16 func_id;
   478	
   479		func_id = hinic_glb_pf_vf_offset(nic_dev->hwdev->hwif) + vf_id;
   480		vf_infos = nic_dev->hwdev->func_to_io.vf_infos + HW_VF_ID_TO_OS(vf_id);
   481		if (vf_infos->pf_set_mac)
   482			hinic_port_del_mac(nic_dev, vf_infos->vf_mac_addr, 0);
   483	
   484		if (hinic_vf_info_vlanprio(nic_dev->hwdev, vf_id))
   485			hinic_kill_vf_vlan(nic_dev->hwdev, vf_id);
   486	
   487		memset(vf_infos, 0, sizeof(*vf_infos));
   488		/* set vf_infos to default */
   489		hinic_init_vf_infos(&nic_dev->hwdev->func_to_io, HW_VF_ID_TO_OS(vf_id));
   490	}
   491	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Download attachment ".config.gz" of type "application/gzip" (35119 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ