[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202208311748.kkZGf9sX-lkp@intel.com>
Date: Wed, 31 Aug 2022 17:28:32 +0800
From: kernel test robot <lkp@...el.com>
To: Anup Patel <apatel@...tanamicro.com>
Cc: llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
linux-kernel@...r.kernel.org,
Mayuresh Chitale <mchitale@...tanamicro.com>
Subject: [avpatel:riscv_pmem_v1 9/11] arch/riscv/mm/cacheflush.c:99:2: error:
call to undeclared function 'for_each_of_cpu_node'; ISO C99 and later do not
support implicit function declarations
tree: https://github.com/avpatel/linux.git riscv_pmem_v1
head: 3d8ca09f6ee6f53dd03a1eeda6a68ef73056601e
commit: 1cb8ad397aba3a012059dacd724ac7772bf6ea54 [9/11] RISC-V: Move riscv_init_cbom_blocksize() to cacheflush.c
config: riscv-randconfig-r042-20220830 (https://download.01.org/0day-ci/archive/20220831/202208311748.kkZGf9sX-lkp@intel.com/config)
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project c7df82e4693c19e3fd2e25c83eb04d9deb7b7b59)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://github.com/avpatel/linux/commit/1cb8ad397aba3a012059dacd724ac7772bf6ea54
git remote add avpatel https://github.com/avpatel/linux.git
git fetch --no-tags avpatel riscv_pmem_v1
git checkout 1cb8ad397aba3a012059dacd724ac7772bf6ea54
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash arch/riscv/mm/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@...el.com>
All errors (new ones prefixed by >>):
>> arch/riscv/mm/cacheflush.c:99:2: error: call to undeclared function 'for_each_of_cpu_node'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
for_each_of_cpu_node(node) {
^
>> arch/riscv/mm/cacheflush.c:99:28: error: expected ';' after expression
for_each_of_cpu_node(node) {
^
;
>> arch/riscv/mm/cacheflush.c:105:4: error: 'continue' statement not in loop statement
continue;
^
arch/riscv/mm/cacheflush.c:108:4: error: 'continue' statement not in loop statement
continue;
^
>> arch/riscv/mm/cacheflush.c:111:9: error: call to undeclared function 'of_property_read_u32'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
ret = of_property_read_u32(node, "riscv,cbom-block-size", &val);
^
arch/riscv/mm/cacheflush.c:113:4: error: 'continue' statement not in loop statement
continue;
^
6 errors generated.
vim +/for_each_of_cpu_node +99 arch/riscv/mm/cacheflush.c
91
92 #ifdef CONFIG_RISCV_ISA_ZICBOM
93 void riscv_init_cbom_blocksize(void)
94 {
95 struct device_node *node;
96 int ret;
97 u32 val;
98
> 99 for_each_of_cpu_node(node) {
100 unsigned long hartid;
101 int cbom_hartid;
102
103 ret = riscv_of_processor_hartid(node, &hartid);
104 if (ret)
> 105 continue;
106
107 if (hartid < 0)
108 continue;
109
110 /* set block-size for cbom extension if available */
> 111 ret = of_property_read_u32(node, "riscv,cbom-block-size", &val);
--
0-DAY CI Kernel Test Service
https://01.org/lkp
Powered by blists - more mailing lists