[openeuler:OLK-6.6 2835/2835] arch/loongarch/kernel/legacy_boot.c:106:34: error: call to undeclared function 'nid_to_addrbase'; ISO C99 and later do not support implicit function declarations

tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 0ee8b2a47575cd8786900505a657c833b2dd4c2f commit: db5bb24abc8dd120fd81b7ce21819e96578d011e [2835/2835] LoongArch: Old BPI compatibility config: loongarch-randconfig-001-20250902 (https://download.01.org/0day-ci/archive/20250902/202509021841.nRo3YUph-lkp@i...) compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 2e122990391b2ba062e6308a12cfedf7206270ba) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250902/202509021841.nRo3YUph-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/202509021841.nRo3YUph-lkp@intel.com/ All errors (new ones prefixed by >>): In file included from arch/loongarch/kernel/legacy_boot.c:11: In file included from include/linux/acpi.h:14: In file included from include/linux/device.h:32: In file included from include/linux/device/driver.h:21: In file included from include/linux/module.h:19: In file included from include/linux/elf.h:6: In file included from arch/loongarch/include/asm/elf.h:13: In file included from arch/loongarch/include/asm/vdso.h:10: In file included from include/linux/mm.h:2168: 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_" | ~~~~~~~~~~~ ^ ~~~
arch/loongarch/kernel/legacy_boot.c:106:34: error: call to undeclared function 'nid_to_addrbase'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 106 | pchpic_default[idx].address |= nid_to_addrbase(id) | HT1LO_OFFSET; | ^ arch/loongarch/kernel/legacy_boot.c:94:6: warning: no previous prototype for function 'register_default_pic' [-Wmissing-prototypes] 94 | void register_default_pic(int id, u32 address, u32 irq_base) | ^ arch/loongarch/kernel/legacy_boot.c:94:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 94 | void register_default_pic(int id, u32 address, u32 irq_base) | ^ | static arch/loongarch/kernel/legacy_boot.c:242:13: warning: no previous prototype for function 'fw_init_cmdline' [-Wmissing-prototypes] 242 | __init void fw_init_cmdline(unsigned long argc, unsigned long cmdp) | ^ arch/loongarch/kernel/legacy_boot.c:242:8: note: declare 'static' if the function is not intended to be used outside of this translation unit 242 | __init void fw_init_cmdline(unsigned long argc, unsigned long cmdp) | ^ | static arch/loongarch/kernel/legacy_boot.c:341:14: warning: no previous prototype for function 'bpi_init' [-Wmissing-prototypes] 341 | unsigned int bpi_init(void) | ^ arch/loongarch/kernel/legacy_boot.c:341:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 341 | unsigned int bpi_init(void) | ^ | static 4 warnings and 1 error generated.
vim +/nid_to_addrbase +106 arch/loongarch/kernel/legacy_boot.c 93 94 void register_default_pic(int id, u32 address, u32 irq_base) 95 { 96 int idx, entries; 97 unsigned long addr; 98 99 if (bad_pch_pic(address)) 100 return; 101 102 idx = nr_io_pics; 103 104 pchpic_default[idx].address = address; 105 if (idx)
106 pchpic_default[idx].address |= nid_to_addrbase(id) | HT1LO_OFFSET; 107 pchpic_default[idx].id = id; 108 pchpic_default[idx].version = 0; 109 pchpic_default[idx].size = 0x1000; 110 pchpic_default[idx].gsi_base = irq_base; 111 112 msi_group[nr_io_pics].pci_segment = nr_io_pics; 113 pch_group[nr_io_pics].node = msi_group[nr_io_pics].node = id; 114 115 addr = pchpic_default[idx].address; 116 /* Read INT_ID.int_num */ 117 entries = (((unsigned long)ls7a_readq(addr) >> 48) & 0xff) + 1; 118 pchmsi_default[idx].msg_address = MSI_MSG_ADDRESS; 119 pchmsi_default[idx].start = entries; 120 pchmsi_default[idx].count = MSI_MSG_DEFAULT_COUNT; 121 122 eiointc_default[idx].cascade = 3; 123 eiointc_default[idx].node = id; 124 eiointc_default[idx].node_map = 1; 125 126 if (idx) { 127 eiointc_default[idx].cascade = 0x4; 128 eiointc_default[0].node_map = 0x1DF; 129 eiointc_default[idx].node_map = 0xFE20; 130 } 131 132 acpi_pchpic[idx] = &pchpic_default[idx]; 133 acpi_pchmsi[idx] = &pchmsi_default[idx]; 134 acpi_eiointc[idx] = &eiointc_default[idx]; 135 136 nr_io_pics++; 137 } 138
-- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
participants (1)
-
kernel test robot