Hi Zhou,
FYI, the error/warning still remains.
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 1e531b8351b843cd4a160764c0f67e4c9805234d commit: 9c1c9598010fbb9daa1e2a67d23830092fb6246a [1682/1682] net/hinic: Update Huawei Intelligent Network Card Driver: hinic config: arm64-randconfig-001-20241231 (https://download.01.org/0day-ci/archive/20250101/202501010108.ACLHt8gM-lkp@i...) compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 319b89197348b7cad1215e235bdc7b5ec8f9b72c) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250101/202501010108.ACLHt8gM-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/202501010108.ACLHt8gM-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from drivers/net/ethernet/huawei/hinic/hinic_lld.c:18: In file included from include/linux/pci.h:1663: In file included from include/linux/dmapool.h:14: In file included from include/linux/scatterlist.h:8: In file included from include/linux/mm.h:2193: include/linux/vmstat.h:522:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 522 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_" | ~~~~~~~~~~~ ^ ~~~ drivers/net/ethernet/huawei/hinic/hinic_lld.c:447:6: warning: no previous prototype for function 'hinic_init_syncfw_timer' [-Wmissing-prototypes] 447 | void hinic_init_syncfw_timer(struct hinic_pcidev *pci_adapter) | ^ drivers/net/ethernet/huawei/hinic/hinic_lld.c:447:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 447 | void hinic_init_syncfw_timer(struct hinic_pcidev *pci_adapter) | ^ | static drivers/net/ethernet/huawei/hinic/hinic_lld.c:462:6: warning: no previous prototype for function 'hinic_destroy_syncfw_timer' [-Wmissing-prototypes] 462 | void hinic_destroy_syncfw_timer(struct hinic_pcidev *pci_adapter) | ^ drivers/net/ethernet/huawei/hinic/hinic_lld.c:462:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 462 | void hinic_destroy_syncfw_timer(struct hinic_pcidev *pci_adapter) | ^ | static drivers/net/ethernet/huawei/hinic/hinic_lld.c:550:5: warning: no previous prototype for function 'hinic_version_cmp' [-Wmissing-prototypes] 550 | int hinic_version_cmp(char *ver1, char *ver2) | ^ drivers/net/ethernet/huawei/hinic/hinic_lld.c:550:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 550 | int hinic_version_cmp(char *ver1, char *ver2) | ^ | static drivers/net/ethernet/huawei/hinic/hinic_lld.c:1139:7: warning: no previous prototype for function 'hinic_get_ppf_hwdev_by_pdev' [-Wmissing-prototypes] 1139 | void *hinic_get_ppf_hwdev_by_pdev(struct pci_dev *pdev) | ^ drivers/net/ethernet/huawei/hinic/hinic_lld.c:1139:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 1139 | void *hinic_get_ppf_hwdev_by_pdev(struct pci_dev *pdev) | ^ | static drivers/net/ethernet/huawei/hinic/hinic_lld.c:1296:6: warning: no previous prototype for function 'hinic_get_card_func_info_by_card_name' [-Wmissing-prototypes] 1296 | void hinic_get_card_func_info_by_card_name(const char *chip_name, | ^ drivers/net/ethernet/huawei/hinic/hinic_lld.c:1296:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 1296 | void hinic_get_card_func_info_by_card_name(const char *chip_name, | ^ | static drivers/net/ethernet/huawei/hinic/hinic_lld.c:1896:6: warning: no previous prototype for function 'hinic_event_process' [-Wmissing-prototypes] 1896 | void hinic_event_process(void *adapter, struct hinic_event_info *event) | ^ drivers/net/ethernet/huawei/hinic/hinic_lld.c:1896:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 1896 | void hinic_event_process(void *adapter, struct hinic_event_info *event) | ^ | static
drivers/net/ethernet/huawei/hinic/hinic_lld.c:2138:10: error: use of undeclared identifier 'disable_vf_load'
2138 | return disable_vf_load; | ^ drivers/net/ethernet/huawei/hinic/hinic_lld.c:2156:9: error: use of undeclared identifier 'disable_vf_load' 2156 | return disable_vf_load; | ^ drivers/net/ethernet/huawei/hinic/hinic_lld.c:2198:39: error: use of undeclared identifier 'disable_vf_load' 2198 | hinic_set_vf_load_state(pci_adapter, disable_vf_load); | ^ drivers/net/ethernet/huawei/hinic/hinic_lld.c:2263:33: warning: shift count >= width of type [-Wshift-count-overflow] 2263 | err = dma_set_mask(&pdev->dev, DMA_BIT_MASK(64)); | ^~~~~~~~~~~~~~~~ include/linux/dma-mapping.h:77:54: note: expanded from macro 'DMA_BIT_MASK' 77 | #define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1)) | ^ ~~~ drivers/net/ethernet/huawei/hinic/hinic_lld.c:2273:42: warning: shift count >= width of type [-Wshift-count-overflow] 2273 | err = dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(64)); | ^~~~~~~~~~~~~~~~ include/linux/dma-mapping.h:77:54: note: expanded from macro 'DMA_BIT_MASK' 77 | #define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1)) | ^ ~~~ drivers/net/ethernet/huawei/hinic/hinic_lld.c:2419:11: error: use of undeclared identifier 'disable_vf_load' 2419 | true : disable_vf_load; | ^ 9 warnings and 4 errors generated.
vim +/disable_vf_load +2138 drivers/net/ethernet/huawei/hinic/hinic_lld.c
2126 2127 static bool hinic_get_vf_load_state(struct pci_dev *pdev) 2128 { 2129 unsigned char parent_bus_number; 2130 struct card_node *chip_node; 2131 u8 id; 2132 2133 if (!pdev->is_virtfn) 2134 return false; 2135 2136 /* vf used in vm */ 2137 if (pci_is_root_bus(pdev->bus))
2138 return disable_vf_load;
2139 2140 parent_bus_number = pdev->bus->parent->number; 2141 2142 lld_dev_hold(); 2143 list_for_each_entry(chip_node, &g_hinic_chip_list, node) { 2144 if (chip_node->dp_bus_num == parent_bus_number) { 2145 for (id = 0; id < HINIC_MAX_PF_NUM; id++) { 2146 if (chip_node->pf_bus_num[id] == 2147 pdev->bus->number) { 2148 lld_dev_put(); 2149 return chip_node->disable_vf_load[id]; 2150 } 2151 } 2152 } 2153 } 2154 lld_dev_put(); 2155 2156 return disable_vf_load; 2157 } 2158