tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: ab4fcabb7d813ddd7a455c85557f8d0891df4c41 commit: 11557c1ae4529f133483879b7ee00b7d8c653be7 [9864/16090] x86/cpu/zhaoxin: Encapsulate access to kh40000_dma_direct_ops within function config: x86_64-buildonly-randconfig-002-20241104 (https://download.01.org/0day-ci/archive/20241105/202411050505.GKcOQBxL-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/202411050505.GKcOQBxL-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/202411050505.GKcOQBxL-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:727:34: warning: no previous prototype for function 'kh40000_get_direct_dma_ops' [-Wmissing-prototypes]
727 | __weak const struct dma_map_ops *kh40000_get_direct_dma_ops(void) | ^ arch/x86/kernel/early-quirks.c:727:14: note: declare 'static' if the function is not intended to be used outside of this translation unit 727 | __weak const struct dma_map_ops *kh40000_get_direct_dma_ops(void) | ^ | static 3 warnings generated.
vim +/kh40000_get_direct_dma_ops +727 arch/x86/kernel/early-quirks.c
721
722 bool is_zhaoxin_kh40000(void)
723 { 724 return zhaoxin_kh40000; 725 } 726
727 __weak const struct dma_map_ops *kh40000_get_direct_dma_ops(void)
728 { 729 return dma_ops; 730 } 731