tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: ab4fcabb7d813ddd7a455c85557f8d0891df4c41 commit: 8eaba08b2d72718a40cafe3402ab4f26b0dc62eb [9863/16090] x86/cpu/zhaoxin: Encapsulate access to global variables within functions config: x86_64-buildonly-randconfig-002-20241104 (https://download.01.org/0day-ci/archive/20241105/202411050336.auofJ1jN-lkp@i...) compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241105/202411050336.auofJ1jN-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/202411050336.auofJ1jN-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from arch/x86/kernel/early-quirks.c:13: In file included from include/linux/pci.h:1666: 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:2235: 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/x86/kernel/early-quirks.c:722:6: warning: no previous prototype for function 'is_zhaoxin_kh40000' [-Wmissing-prototypes]
722 | bool is_zhaoxin_kh40000(void) | ^ arch/x86/kernel/early-quirks.c:722:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 722 | bool is_zhaoxin_kh40000(void) | ^ | static arch/x86/kernel/early-quirks.c:737:14: error: use of undeclared identifier 'kh40000_dma_direct_ops' 737 | dma_ops = &kh40000_dma_direct_ops; | ^ 2 warnings and 1 error generated. -- In file included from kernel/dma/contiguous.c:48: In file included from include/linux/memblock.h:12: In file included from include/linux/mm.h:2235: 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_" | ~~~~~~~~~~~ ^ ~~~
kernel/dma/contiguous.c:209:13: warning: no previous prototype for function 'is_zhaoxin_kh40000' [-Wmissing-prototypes]
209 | bool __weak is_zhaoxin_kh40000(void) | ^ kernel/dma/contiguous.c:209:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 209 | bool __weak is_zhaoxin_kh40000(void) | ^ | static kernel/dma/contiguous.c:73:26: warning: unused variable 'size_bytes' [-Wunused-const-variable] 73 | static const phys_addr_t size_bytes __initconst = | ^~~~~~~~~~ 3 warnings generated.
vim +/is_zhaoxin_kh40000 +722 arch/x86/kernel/early-quirks.c
721
722 bool is_zhaoxin_kh40000(void)
723 { 724 return zhaoxin_kh40000; 725 } 726