[openeuler:OLK-5.10 2891/2891] drivers/net/ethernet/huawei/hinic3/hinic3_main.c:1211:6: warning: no previous prototype for function 'hinic3_need_proc_link_event'

tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: 2e5032bf08eca1f3b062773540ff27c51788390d commit: 79871cd2cd720225eb582c9ed49fb4a96a270b3b [2891/2891] net/hinic3: Synchronize new NIC features and bug fixes config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20250510/202505100150.DG1QGwH3-lkp@i...) compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250510/202505100150.DG1QGwH3-lkp@i...) 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/202505100150.DG1QGwH3-lkp@intel.com/ All warnings (new ones prefixed by >>):
drivers/net/ethernet/huawei/hinic3/hw/hinic3_hw_comm.c:1671:6: warning: no previous prototype for function 'hinic3_is_optical_module_mode' [-Wmissing-prototypes] 1671 | bool hinic3_is_optical_module_mode(void *hwdev) | ^ drivers/net/ethernet/huawei/hinic3/hw/hinic3_hw_comm.c:1671:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 1671 | bool hinic3_is_optical_module_mode(void *hwdev) | ^ | static 1 warning generated. -- drivers/net/ethernet/huawei/hinic3/hw/hinic3_sriov.c:176:5: warning: no previous prototype for function 'hinic3_pci_sriov_check' [-Wmissing-prototypes] 176 | int hinic3_pci_sriov_check(struct hinic3_sriov_info *sriov_info, struct pci_dev *dev, int num_vfs) | ^ drivers/net/ethernet/huawei/hinic3/hw/hinic3_sriov.c:176:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 176 | int hinic3_pci_sriov_check(struct hinic3_sriov_info *sriov_info, struct pci_dev *dev, int num_vfs) | ^ | static 1 warning generated. -- drivers/net/ethernet/huawei/hinic3/hw/hinic3_lld.c:103:6: warning: no previous prototype for function 'hinic3_uld_lock_init' [-Wmissing-prototypes] 103 | void hinic3_uld_lock_init(void) | ^ drivers/net/ethernet/huawei/hinic3/hw/hinic3_lld.c:103:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 103 | void hinic3_uld_lock_init(void) | ^ | static drivers/net/ethernet/huawei/hinic3/hw/hinic3_lld.c:525:5: warning: no previous prototype for function 'hinic3_pdev_is_virtfn' [-Wmissing-prototypes] 525 | u32 hinic3_pdev_is_virtfn(struct pci_dev *pdev) | ^ drivers/net/ethernet/huawei/hinic3/hw/hinic3_lld.c:525:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 525 | u32 hinic3_pdev_is_virtfn(struct pci_dev *pdev) | ^ | static drivers/net/ethernet/huawei/hinic3/hw/hinic3_lld.c:785:5: warning: no previous prototype for function '__set_vroce_func_state' [-Wmissing-prototypes] 785 | int __set_vroce_func_state(struct hinic3_pcidev *pci_adapter) | ^ drivers/net/ethernet/huawei/hinic3/hw/hinic3_lld.c:785:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 785 | int __set_vroce_func_state(struct hinic3_pcidev *pci_adapter) | ^ | static drivers/net/ethernet/huawei/hinic3/hw/hinic3_lld.c:826:6: warning: no previous prototype for function 'slave_host_mgmt_vroce_work' [-Wmissing-prototypes] 826 | void slave_host_mgmt_vroce_work(struct work_struct *work) | ^ drivers/net/ethernet/huawei/hinic3/hw/hinic3_lld.c:826:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 826 | void slave_host_mgmt_vroce_work(struct work_struct *work) | ^ | static drivers/net/ethernet/huawei/hinic3/hw/hinic3_lld.c:834:7: warning: no previous prototype for function 'hinic3_get_roce_uld_by_pdev' [-Wmissing-prototypes] 834 | void *hinic3_get_roce_uld_by_pdev(struct pci_dev *pdev) | ^ drivers/net/ethernet/huawei/hinic3/hw/hinic3_lld.c:834:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 834 | void *hinic3_get_roce_uld_by_pdev(struct pci_dev *pdev) | ^ | static drivers/net/ethernet/huawei/hinic3/hw/hinic3_lld.c:1796:6: warning: no previous prototype for function 'hinic3_set_func_state' [-Wmissing-prototypes] 1796 | void hinic3_set_func_state(struct hinic3_pcidev *pci_adapter) | ^ drivers/net/ethernet/huawei/hinic3/hw/hinic3_lld.c:1796:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 1796 | void hinic3_set_func_state(struct hinic3_pcidev *pci_adapter) | ^ | static drivers/net/ethernet/huawei/hinic3/hw/hinic3_lld.c:1822:6: warning: no previous prototype for function 'slave_host_mgmt_work' [-Wmissing-prototypes] 1822 | void slave_host_mgmt_work(struct work_struct *work) | ^ drivers/net/ethernet/huawei/hinic3/hw/hinic3_lld.c:1822:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 1822 | void slave_host_mgmt_work(struct work_struct *work) | ^ | static 7 warnings generated. -- drivers/net/ethernet/huawei/hinic3/hw/hinic3_dev_mgmt.c:618:6: warning: no previous prototype for function 'hinic3_write_oshr_info' [-Wmissing-prototypes] 618 | void hinic3_write_oshr_info(struct os_hot_replace_info *out_oshr_info, | ^ drivers/net/ethernet/huawei/hinic3/hw/hinic3_dev_mgmt.c:618:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 618 | void hinic3_write_oshr_info(struct os_hot_replace_info *out_oshr_info, | ^ | static 1 warning generated. -- drivers/net/ethernet/huawei/hinic3/hw/hinic3_hwif.c:865:5: warning: no previous prototype for function 'hinic3_global_func_id_hw' [-Wmissing-prototypes] 865 | u16 hinic3_global_func_id_hw(void *hwdev) | ^ drivers/net/ethernet/huawei/hinic3/hw/hinic3_hwif.c:865:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 865 | u16 hinic3_global_func_id_hw(void *hwdev) | ^ | static 1 warning generated. -- drivers/net/ethernet/huawei/hinic3/hinic3_main.c:1211:6: warning: no previous prototype for function 'hinic3_need_proc_link_event' [-Wmissing-prototypes] 1211 | bool hinic3_need_proc_link_event(struct hinic3_lld_dev *lld_dev) | ^ drivers/net/ethernet/huawei/hinic3/hinic3_main.c:1211:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 1211 | bool hinic3_need_proc_link_event(struct hinic3_lld_dev *lld_dev) | ^ | static drivers/net/ethernet/huawei/hinic3/hinic3_main.c:1258:6: warning: no previous prototype for function 'hinic3_need_proc_bond_event' [-Wmissing-prototypes] 1258 | bool hinic3_need_proc_bond_event(struct hinic3_lld_dev *lld_dev) | ^ drivers/net/ethernet/huawei/hinic3/hinic3_main.c:1258:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 1258 | bool hinic3_need_proc_bond_event(struct hinic3_lld_dev *lld_dev) | ^ | static 2 warnings generated. -- drivers/net/ethernet/huawei/hinic3/hinic3_ethtool_stats.c:342:5: warning: no previous prototype for function 'hinic3_rx_queue_stat_pack' [-Wmissing-prototypes] 342 | int hinic3_rx_queue_stat_pack(struct hinic3_show_item *item, | ^ drivers/net/ethernet/huawei/hinic3/hinic3_ethtool_stats.c:342:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 342 | int hinic3_rx_queue_stat_pack(struct hinic3_show_item *item, | ^ | static drivers/net/ethernet/huawei/hinic3/hinic3_ethtool_stats.c:357:5: warning: no previous prototype for function 'hinic3_tx_queue_stat_pack' [-Wmissing-prototypes] 357 | int hinic3_tx_queue_stat_pack(struct hinic3_show_item *item, | ^ drivers/net/ethernet/huawei/hinic3/hinic3_ethtool_stats.c:357:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 357 | int hinic3_tx_queue_stat_pack(struct hinic3_show_item *item, | ^ | static 2 warnings generated. -- drivers/net/ethernet/huawei/hinic3/hinic3_dbg.c:689:5: warning: variable 'cos_num' set but not used [-Wunused-but-set-variable] 689 | u8 cos_num, valid_cos_bitmap; | ^ 1 warning generated. -- drivers/net/ethernet/huawei/hinic3/hinic3_netdev_ops.c:59:6: warning: variable 'size' set but not used [-Wunused-but-set-variable] 59 | u32 size; | ^ drivers/net/ethernet/huawei/hinic3/hinic3_netdev_ops.c:1757:5: warning: no previous prototype for function 'hinic3_ndo_set_vf_link_state' [-Wmissing-prototypes] 1757 | int hinic3_ndo_set_vf_link_state(struct net_device *netdev, int vf_id, int link) | ^ drivers/net/ethernet/huawei/hinic3/hinic3_netdev_ops.c:1757:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 1757 | int hinic3_ndo_set_vf_link_state(struct net_device *netdev, int vf_id, int link) | ^ | static 2 warnings generated. -- drivers/net/ethernet/huawei/hinic3/hw/hinic3_hw_api.c:54: warning: Function parameter or member 'instance' not described in 'hinic3_sm_ctr_rd16' drivers/net/ethernet/huawei/hinic3/hw/hinic3_hw_api.c:95: warning: Function parameter or member 'instance' not described in 'hinic3_sm_ctr_rd16_clear' drivers/net/ethernet/huawei/hinic3/hw/hinic3_hw_api.c:137: warning: Function parameter or member 'instance' not described in 'hinic3_sm_ctr_rd32' drivers/net/ethernet/huawei/hinic3/hw/hinic3_hw_api.c:179: warning: Function parameter or member 'instance' not described in 'hinic3_sm_ctr_rd32_clear' drivers/net/ethernet/huawei/hinic3/hw/hinic3_hw_api.c:222: warning: Function parameter or member 'instance' not described in 'hinic3_sm_ctr_rd64_pair' drivers/net/ethernet/huawei/hinic3/hw/hinic3_hw_api.c:277: warning: Function parameter or member 'instance' not described in 'hinic3_sm_ctr_rd64_pair_clear' drivers/net/ethernet/huawei/hinic3/hw/hinic3_hw_api.c:319: warning: Function parameter or member 'instance' not described in 'hinic3_sm_ctr_rd64' drivers/net/ethernet/huawei/hinic3/hw/hinic3_hw_api.c:360: warning: Function parameter or member 'instance' not described in 'hinic3_sm_ctr_rd64_clear' -- drivers/net/ethernet/huawei/hinic3/hinic3_mag_cfg.c:623:6: warning: no previous prototype for function 'print_port_info' [-Wmissing-prototypes] 623 | void print_port_info(struct hinic3_nic_io *nic_io, | ^ drivers/net/ethernet/huawei/hinic3/hinic3_mag_cfg.c:623:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 623 | void print_port_info(struct hinic3_nic_io *nic_io, | ^ | static drivers/net/ethernet/huawei/hinic3/hinic3_mag_cfg.c:802:6: warning: no previous prototype for function 'hinic3_notify_vf_bond_status' [-Wmissing-prototypes] 802 | void hinic3_notify_vf_bond_status(struct hinic3_nic_io *nic_io, | ^ drivers/net/ethernet/huawei/hinic3/hinic3_mag_cfg.c:802:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 802 | void hinic3_notify_vf_bond_status(struct hinic3_nic_io *nic_io, | ^ | static drivers/net/ethernet/huawei/hinic3/hinic3_mag_cfg.c:832:6: warning: no previous prototype for function 'hinic3_notify_all_vfs_bond_changed' [-Wmissing-prototypes] 832 | void hinic3_notify_all_vfs_bond_changed(void *hwdev, u8 bond_status) | ^ drivers/net/ethernet/huawei/hinic3/hinic3_mag_cfg.c:832:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 832 | void hinic3_notify_all_vfs_bond_changed(void *hwdev, u8 bond_status) | ^ | static drivers/net/ethernet/huawei/hinic3/hinic3_mag_cfg.c:1678:5: warning: no previous prototype for function 'set_fecparam' [-Wmissing-prototypes] 1678 | int set_fecparam(void *hwdev, u8 fecparam) | ^ drivers/net/ethernet/huawei/hinic3/hinic3_mag_cfg.c:1678:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 1678 | int set_fecparam(void *hwdev, u8 fecparam) | ^ | static drivers/net/ethernet/huawei/hinic3/hinic3_mag_cfg.c:1706:5: warning: no previous prototype for function 'get_fecparam' [-Wmissing-prototypes] 1706 | int get_fecparam(void *hwdev, u8 *advertised_fec, u8 *supported_fec) | ^ drivers/net/ethernet/huawei/hinic3/hinic3_mag_cfg.c:1706:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 1706 | int get_fecparam(void *hwdev, u8 *advertised_fec, u8 *supported_fec) | ^ | static 5 warnings generated. ..
vim +/hinic3_need_proc_link_event +1211 drivers/net/ethernet/huawei/hinic3/hinic3_main.c 1210
1211 bool hinic3_need_proc_link_event(struct hinic3_lld_dev *lld_dev) 1212 { 1213 int ret = 0; 1214 u16 func_id; 1215 u8 roce_enable = false; 1216 bool is_slave_func = false; 1217 struct hinic3_hw_bond_infos hw_bond_infos = {0}; 1218 1219 if (!lld_dev) 1220 return false; 1221 1222 /* 非slave设备需要处理link down事件 */ 1223 ret = hinic3_is_slave_func(lld_dev->hwdev, &is_slave_func); 1224 if (ret != 0) { 1225 nic_err(&lld_dev->pdev->dev, "NIC get info, lld_dev is null\n"); 1226 return true; 1227 } 1228 1229 if (!is_slave_func) 1230 return true; 1231 1232 /* 未使能了vroce功能,需处理link down事件 */ 1233 func_id = hinic3_global_func_id(lld_dev->hwdev); 1234 ret = hinic3_get_func_vroce_enable(lld_dev->hwdev, func_id, 1235 &roce_enable); 1236 if (ret != 0) 1237 return true; 1238 1239 if (!roce_enable) 1240 return true; 1241 1242 /* 未创建bond,需要处理link down事件 */ 1243 hw_bond_infos.bond_id = HINIC_OVS_BOND_DEFAULT_ID; 1244 1245 ret = hinic3_get_hw_bond_infos(lld_dev->hwdev, &hw_bond_infos, 1246 HINIC3_CHANNEL_COMM); 1247 if (ret != 0) { 1248 pr_err("[ROCE, ERR] Get chipf bond info failed (%d)\n", ret); 1249 return true; 1250 } 1251 1252 if (!hw_bond_infos.valid) 1253 return true; 1254 1255 return false; 1256 } 1257 1258 bool hinic3_need_proc_bond_event(struct hinic3_lld_dev *lld_dev) 1259 { 1260 return !hinic3_need_proc_link_event(lld_dev); 1261 } 1262
-- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
participants (1)
-
kernel test robot