[openeuler:OLK-5.10 2978/2978] drivers/net/ethernet/huawei/hinic3/cqm/cqm_bitmap_table.c:331:68: warning: suggest braces around empty body in an 'if' statement

tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: 5e8b5c945557e13053f64d08e9859d56c789362f commit: 79871cd2cd720225eb582c9ed49fb4a96a270b3b [2978/2978] net/hinic3: Synchronize new NIC features and bug fixes config: x86_64-buildonly-randconfig-002-20250623 (https://download.01.org/0day-ci/archive/20250623/202506232147.n7w5pLY6-lkp@i...) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250623/202506232147.n7w5pLY6-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/202506232147.n7w5pLY6-lkp@intel.com/ All warnings (new ones prefixed by >>): drivers/net/ethernet/huawei/hinic3/hw/hinic3_lld.c:103:6: warning: no previous prototype for 'hinic3_uld_lock_init' [-Wmissing-prototypes] 103 | void hinic3_uld_lock_init(void) | ^~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/huawei/hinic3/hw/hinic3_lld.c:525:5: warning: no previous prototype for '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:785:5: warning: no previous prototype for '__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:826:6: warning: no previous prototype for '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:834:7: warning: no previous prototype for '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:1796:6: warning: no previous prototype for '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:1822:6: warning: no previous prototype for 'slave_host_mgmt_work' [-Wmissing-prototypes] 1822 | void slave_host_mgmt_work(struct work_struct *work) | ^~~~~~~~~~~~~~~~~~~~ -- drivers/net/ethernet/huawei/hinic3/hw/hinic3_dev_mgmt.c:618:6: warning: no previous prototype for '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_hwif.c:865:5: warning: no previous prototype for 'hinic3_global_func_id_hw' [-Wmissing-prototypes] 865 | u16 hinic3_global_func_id_hw(void *hwdev) | ^~~~~~~~~~~~~~~~~~~~~~~~ -- drivers/net/ethernet/huawei/hinic3/cqm/cqm_bitmap_table.c: In function 'cqm_buf_vram_free': drivers/net/ethernet/huawei/hinic3/cqm/cqm_bitmap_table.c:331:68: warning: suggest braces around empty body in an 'if' statement [-Wempty-body] 331 | (u64)buf->buf_size * buf->buf_number); | ^ -- drivers/net/ethernet/huawei/hinic3/hinic3_ethtool_stats.c:342:5: warning: no previous prototype for '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:357:5: warning: no previous prototype for 'hinic3_tx_queue_stat_pack' [-Wmissing-prototypes] 357 | int hinic3_tx_queue_stat_pack(struct hinic3_show_item *item, | ^~~~~~~~~~~~~~~~~~~~~~~~~ -- drivers/net/ethernet/huawei/hinic3/hw/hinic3_hw_comm.c:1671:6: warning: no previous prototype for 'hinic3_is_optical_module_mode' [-Wmissing-prototypes] 1671 | bool hinic3_is_optical_module_mode(void *hwdev) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- drivers/net/ethernet/huawei/hinic3/hinic3_mag_cfg.c:623:6: warning: no previous prototype for '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:802:6: warning: no previous prototype for '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:832:6: warning: no previous prototype for '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:1678:5: warning: no previous prototype for 'set_fecparam' [-Wmissing-prototypes] 1678 | int set_fecparam(void *hwdev, u8 fecparam) | ^~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic3/hinic3_mag_cfg.c:1706:5: warning: no previous prototype for 'get_fecparam' [-Wmissing-prototypes] 1706 | int get_fecparam(void *hwdev, u8 *advertised_fec, u8 *supported_fec) | ^~~~~~~~~~~~ -- drivers/net/ethernet/huawei/hinic3/hinic3_main.c:1211:6: warning: no previous prototype for '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:1258:6: warning: no previous prototype for 'hinic3_need_proc_bond_event' [-Wmissing-prototypes] 1258 | bool hinic3_need_proc_bond_event(struct hinic3_lld_dev *lld_dev) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ -- In file included from drivers/net/ethernet/huawei/hinic3/cqm/cqm_object.h:7, from drivers/net/ethernet/huawei/hinic3/cqm/cqm_bitmap_table.h:11, from drivers/net/ethernet/huawei/hinic3/cqm/cqm_cmd.c:15: drivers/net/ethernet/huawei/hinic3/cqm/cqm_define.h:13:44: warning: no previous prototype for 'cqm3_cmd_alloc' [-Wmissing-prototypes] 13 | #define cqm_cmd_alloc cqm3_cmd_alloc | ^~~~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic3/cqm/cqm_cmd.c:24:25: note: in expansion of macro 'cqm_cmd_alloc' 24 | struct tag_cqm_cmd_buf *cqm_cmd_alloc(void *ex_handle) | ^~~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic3/cqm/cqm_define.h:14:44: warning: no previous prototype for 'cqm3_cmd_free' [-Wmissing-prototypes] 14 | #define cqm_cmd_free cqm3_cmd_free | ^~~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic3/cqm/cqm_cmd.c:44:6: note: in expansion of macro 'cqm_cmd_free' 44 | void cqm_cmd_free(void *ex_handle, struct tag_cqm_cmd_buf *cmd_buf) | ^~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic3/cqm/cqm_define.h:15:44: warning: no previous prototype for 'cqm3_send_cmd_box' [-Wmissing-prototypes] 15 | #define cqm_send_cmd_box cqm3_send_cmd_box | ^~~~~~~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic3/cqm/cqm_cmd.c:79:5: note: in expansion of macro 'cqm_send_cmd_box' 79 | s32 cqm_send_cmd_box(void *ex_handle, u8 mod, u8 cmd, struct tag_cqm_cmd_buf *buf_in, | ^~~~~~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic3/cqm/cqm_define.h:16:44: warning: no previous prototype for 'cqm3_lb_send_cmd_box' [-Wmissing-prototypes] 16 | #define cqm_lb_send_cmd_box cqm3_lb_send_cmd_box | ^~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic3/cqm/cqm_cmd.c:120:5: note: in expansion of macro 'cqm_lb_send_cmd_box' 120 | s32 cqm_lb_send_cmd_box(void *ex_handle, u8 mod, u8 cmd, u8 cos_id, | ^~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic3/cqm/cqm_define.h:17:44: warning: no previous prototype for 'cqm3_lb_send_cmd_box_async' [-Wmissing-prototypes] 17 | #define cqm_lb_send_cmd_box_async cqm3_lb_send_cmd_box_async | ^~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic3/cqm/cqm_cmd.c:158:5: note: in expansion of macro 'cqm_lb_send_cmd_box_async' 158 | s32 cqm_lb_send_cmd_box_async(void *ex_handle, u8 mod, u8 cmd, | ^~~~~~~~~~~~~~~~~~~~~~~~~ -- drivers/net/ethernet/huawei/hinic3/hw/hinic3_sriov.c:176:5: warning: no previous prototype for '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) | ^~~~~~~~~~~~~~~~~~~~~~
vim +/if +331 drivers/net/ethernet/huawei/hinic3/cqm/cqm_bitmap_table.c 320 321 static void cqm_buf_vram_free(struct tag_cqm_buf *buf) 322 { 323 s32 i; 324 325 if (buf->buf_list == NULL) { 326 return; 327 } 328 329 if (buf->buf_list[0].va) 330 hi_vram_kfree(buf->buf_list[0].va, buf->buf_info.buf_vram_name,
331 (u64)buf->buf_size * buf->buf_number); 332 333 for (i = 0; i < (s32)buf->buf_number; i++) 334 buf->buf_list[i].va = NULL; 335 } 336
-- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
participants (1)
-
kernel test robot