
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 54d96ebb93c9ff0573fe16586a47778ebe26de32 commit: af34a7a840fd24a050a5fee8ea4dcfad963f3abc [2679/2679] bpf-rvi: Add bpf_mem_percpu kfunc config: loongarch-allmodconfig (https://download.01.org/0day-ci/archive/20250815/202508152311.kWn09op7-lkp@i...) compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project cd708029e0b2869e80abe31ddb175f7c35361f90) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250815/202508152311.kWn09op7-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/202508152311.kWn09op7-lkp@intel.com/ All warnings (new ones prefixed by >>): | ^ | static kernel/bpf-rvi/common_kfuncs.c:124:27: warning: no previous prototype for function 'bpf_get_total_forks' [-Wmissing-prototypes] 124 | __bpf_kfunc unsigned long bpf_get_total_forks(void) | ^ kernel/bpf-rvi/common_kfuncs.c:124:13: note: declare 'static' if the function is not intended to be used outside of this translation unit 124 | __bpf_kfunc unsigned long bpf_get_total_forks(void) | ^ | static kernel/bpf-rvi/common_kfuncs.c:129:26: warning: no previous prototype for function 'bpf_nr_running' [-Wmissing-prototypes] 129 | __bpf_kfunc unsigned int bpf_nr_running(void) | ^ kernel/bpf-rvi/common_kfuncs.c:129:13: note: declare 'static' if the function is not intended to be used outside of this translation unit 129 | __bpf_kfunc unsigned int bpf_nr_running(void) | ^ | static kernel/bpf-rvi/common_kfuncs.c:134:32: warning: no previous prototype for function 'bpf_nr_context_switches' [-Wmissing-prototypes] 134 | __bpf_kfunc unsigned long long bpf_nr_context_switches(void) | ^ kernel/bpf-rvi/common_kfuncs.c:134:13: note: declare 'static' if the function is not intended to be used outside of this translation unit 134 | __bpf_kfunc unsigned long long bpf_nr_context_switches(void) | ^ | static kernel/bpf-rvi/common_kfuncs.c:139:26: warning: no previous prototype for function 'bpf_nr_iowait' [-Wmissing-prototypes] 139 | __bpf_kfunc unsigned int bpf_nr_iowait(void) | ^ kernel/bpf-rvi/common_kfuncs.c:139:13: note: declare 'static' if the function is not intended to be used outside of this translation unit 139 | __bpf_kfunc unsigned int bpf_nr_iowait(void) | ^ | static kernel/bpf-rvi/common_kfuncs.c:145:26: warning: no previous prototype for function 'bpf_kstat_softirqs_cpu' [-Wmissing-prototypes] 145 | __bpf_kfunc unsigned int bpf_kstat_softirqs_cpu(unsigned int irq, int cpu) | ^ kernel/bpf-rvi/common_kfuncs.c:145:13: note: declare 'static' if the function is not intended to be used outside of this translation unit 145 | __bpf_kfunc unsigned int bpf_kstat_softirqs_cpu(unsigned int irq, int cpu) | ^ | static kernel/bpf-rvi/common_kfuncs.c:150:27: warning: no previous prototype for function 'bpf_kstat_cpu_irqs_sum' [-Wmissing-prototypes] 150 | __bpf_kfunc unsigned long bpf_kstat_cpu_irqs_sum(unsigned int cpu) | ^ kernel/bpf-rvi/common_kfuncs.c:150:13: note: declare 'static' if the function is not intended to be used outside of this translation unit 150 | __bpf_kfunc unsigned long bpf_kstat_cpu_irqs_sum(unsigned int cpu) | ^ | static kernel/bpf-rvi/common_kfuncs.c:155:18: warning: no previous prototype for function 'bpf_kcpustat_cpu_fetch' [-Wmissing-prototypes] 155 | __bpf_kfunc void bpf_kcpustat_cpu_fetch(struct kernel_cpustat *dst, int cpu) | ^ kernel/bpf-rvi/common_kfuncs.c:155:13: note: declare 'static' if the function is not intended to be used outside of this translation unit 155 | __bpf_kfunc void bpf_kcpustat_cpu_fetch(struct kernel_cpustat *dst, int cpu) | ^ | static kernel/bpf-rvi/common_kfuncs.c:164:27: warning: no previous prototype for function 'bpf_mem_file_hugepage' [-Wmissing-prototypes] 164 | __bpf_kfunc unsigned long bpf_mem_file_hugepage(void) | ^ kernel/bpf-rvi/common_kfuncs.c:164:13: note: declare 'static' if the function is not intended to be used outside of this translation unit 164 | __bpf_kfunc unsigned long bpf_mem_file_hugepage(void) | ^ | static kernel/bpf-rvi/common_kfuncs.c:169:27: warning: no previous prototype for function 'bpf_mem_file_pmdmapped' [-Wmissing-prototypes] 169 | __bpf_kfunc unsigned long bpf_mem_file_pmdmapped(void) | ^ kernel/bpf-rvi/common_kfuncs.c:169:13: note: declare 'static' if the function is not intended to be used outside of this translation unit 169 | __bpf_kfunc unsigned long bpf_mem_file_pmdmapped(void) | ^ | static kernel/bpf-rvi/common_kfuncs.c:174:27: warning: no previous prototype for function 'bpf_mem_kreclaimable' [-Wmissing-prototypes] 174 | __bpf_kfunc unsigned long bpf_mem_kreclaimable(void) | ^ kernel/bpf-rvi/common_kfuncs.c:174:13: note: declare 'static' if the function is not intended to be used outside of this translation unit 174 | __bpf_kfunc unsigned long bpf_mem_kreclaimable(void) | ^ | static kernel/bpf-rvi/common_kfuncs.c:180:27: warning: no previous prototype for function 'bpf_mem_totalcma' [-Wmissing-prototypes] 180 | __bpf_kfunc unsigned long bpf_mem_totalcma(void) | ^ kernel/bpf-rvi/common_kfuncs.c:180:13: note: declare 'static' if the function is not intended to be used outside of this translation unit 180 | __bpf_kfunc unsigned long bpf_mem_totalcma(void) | ^ | static kernel/bpf-rvi/common_kfuncs.c:185:27: warning: no previous prototype for function 'bpf_mem_freecma' [-Wmissing-prototypes] 185 | __bpf_kfunc unsigned long bpf_mem_freecma(void) | ^ kernel/bpf-rvi/common_kfuncs.c:185:13: note: declare 'static' if the function is not intended to be used outside of this translation unit 185 | __bpf_kfunc unsigned long bpf_mem_freecma(void) | ^ | static kernel/bpf-rvi/common_kfuncs.c:200:17: warning: no previous prototype for function 'bpf_hugetlb_report_meminfo' [-Wmissing-prototypes] 200 | __bpf_kfunc int bpf_hugetlb_report_meminfo(struct bpf_mem_hugepage *hugepage_info) | ^ kernel/bpf-rvi/common_kfuncs.c:200:13: note: declare 'static' if the function is not intended to be used outside of this translation unit 200 | __bpf_kfunc int bpf_hugetlb_report_meminfo(struct bpf_mem_hugepage *hugepage_info) | ^ | static kernel/bpf-rvi/common_kfuncs.c:238:27: warning: no previous prototype for function 'bpf_mem_failure' [-Wmissing-prototypes] 238 | __bpf_kfunc unsigned long bpf_mem_failure(void) | ^ kernel/bpf-rvi/common_kfuncs.c:238:13: note: declare 'static' if the function is not intended to be used outside of this translation unit 238 | __bpf_kfunc unsigned long bpf_mem_failure(void) | ^ | static
kernel/bpf-rvi/common_kfuncs.c:244:27: warning: no previous prototype for function 'bpf_mem_percpu' [-Wmissing-prototypes] 244 | __bpf_kfunc unsigned long bpf_mem_percpu(void) | ^ kernel/bpf-rvi/common_kfuncs.c:244:13: note: declare 'static' if the function is not intended to be used outside of this translation unit 244 | __bpf_kfunc unsigned long bpf_mem_percpu(void) | ^ | static 23 warnings generated.
vim +/bpf_mem_percpu +244 kernel/bpf-rvi/common_kfuncs.c 243
244 __bpf_kfunc unsigned long bpf_mem_percpu(void) 245 { 246 return pcpu_nr_pages(); 247 } 248
-- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki