[openeuler:OLK-6.6 2679/2679] kernel/bpf-rvi/common_kfuncs.c:250:27: warning: no previous prototype for function 'bpf_mem_commit_limit'

tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 54d96ebb93c9ff0573fe16586a47778ebe26de32 commit: 7aa850a9126f0acd994e09afe54bb0200214e068 [2679/2679] bpf-rvi: Add bpf_mem_commit_limit & bpf_mem_committed kfunc config: loongarch-allmodconfig (https://download.01.org/0day-ci/archive/20250816/202508160141.44QSK5Us-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/20250816/202508160141.44QSK5Us-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/202508160141.44QSK5Us-lkp@intel.com/ All warnings (new ones prefixed by >>): | ^ | static kernel/bpf-rvi/common_kfuncs.c:130:26: warning: no previous prototype for function 'bpf_nr_running' [-Wmissing-prototypes] 130 | __bpf_kfunc unsigned int bpf_nr_running(void) | ^ kernel/bpf-rvi/common_kfuncs.c:130:13: note: declare 'static' if the function is not intended to be used outside of this translation unit 130 | __bpf_kfunc unsigned int bpf_nr_running(void) | ^ | static kernel/bpf-rvi/common_kfuncs.c:135:32: warning: no previous prototype for function 'bpf_nr_context_switches' [-Wmissing-prototypes] 135 | __bpf_kfunc unsigned long long bpf_nr_context_switches(void) | ^ kernel/bpf-rvi/common_kfuncs.c:135:13: note: declare 'static' if the function is not intended to be used outside of this translation unit 135 | __bpf_kfunc unsigned long long bpf_nr_context_switches(void) | ^ | static kernel/bpf-rvi/common_kfuncs.c:140:26: warning: no previous prototype for function 'bpf_nr_iowait' [-Wmissing-prototypes] 140 | __bpf_kfunc unsigned int bpf_nr_iowait(void) | ^ kernel/bpf-rvi/common_kfuncs.c:140:13: note: declare 'static' if the function is not intended to be used outside of this translation unit 140 | __bpf_kfunc unsigned int bpf_nr_iowait(void) | ^ | static kernel/bpf-rvi/common_kfuncs.c:146:26: warning: no previous prototype for function 'bpf_kstat_softirqs_cpu' [-Wmissing-prototypes] 146 | __bpf_kfunc unsigned int bpf_kstat_softirqs_cpu(unsigned int irq, int cpu) | ^ kernel/bpf-rvi/common_kfuncs.c:146:13: note: declare 'static' if the function is not intended to be used outside of this translation unit 146 | __bpf_kfunc unsigned int bpf_kstat_softirqs_cpu(unsigned int irq, int cpu) | ^ | static kernel/bpf-rvi/common_kfuncs.c:151:27: warning: no previous prototype for function 'bpf_kstat_cpu_irqs_sum' [-Wmissing-prototypes] 151 | __bpf_kfunc unsigned long bpf_kstat_cpu_irqs_sum(unsigned int cpu) | ^ kernel/bpf-rvi/common_kfuncs.c:151:13: note: declare 'static' if the function is not intended to be used outside of this translation unit 151 | __bpf_kfunc unsigned long bpf_kstat_cpu_irqs_sum(unsigned int cpu) | ^ | static kernel/bpf-rvi/common_kfuncs.c:156:18: warning: no previous prototype for function 'bpf_kcpustat_cpu_fetch' [-Wmissing-prototypes] 156 | __bpf_kfunc void bpf_kcpustat_cpu_fetch(struct kernel_cpustat *dst, int cpu) | ^ kernel/bpf-rvi/common_kfuncs.c:156:13: note: declare 'static' if the function is not intended to be used outside of this translation unit 156 | __bpf_kfunc void bpf_kcpustat_cpu_fetch(struct kernel_cpustat *dst, int cpu) | ^ | static kernel/bpf-rvi/common_kfuncs.c:165:27: warning: no previous prototype for function 'bpf_mem_file_hugepage' [-Wmissing-prototypes] 165 | __bpf_kfunc unsigned long bpf_mem_file_hugepage(void) | ^ kernel/bpf-rvi/common_kfuncs.c:165:13: note: declare 'static' if the function is not intended to be used outside of this translation unit 165 | __bpf_kfunc unsigned long bpf_mem_file_hugepage(void) | ^ | static kernel/bpf-rvi/common_kfuncs.c:170:27: warning: no previous prototype for function 'bpf_mem_file_pmdmapped' [-Wmissing-prototypes] 170 | __bpf_kfunc unsigned long bpf_mem_file_pmdmapped(void) | ^ kernel/bpf-rvi/common_kfuncs.c:170:13: note: declare 'static' if the function is not intended to be used outside of this translation unit 170 | __bpf_kfunc unsigned long bpf_mem_file_pmdmapped(void) | ^ | static kernel/bpf-rvi/common_kfuncs.c:175:27: warning: no previous prototype for function 'bpf_mem_kreclaimable' [-Wmissing-prototypes] 175 | __bpf_kfunc unsigned long bpf_mem_kreclaimable(void) | ^ kernel/bpf-rvi/common_kfuncs.c:175:13: note: declare 'static' if the function is not intended to be used outside of this translation unit 175 | __bpf_kfunc unsigned long bpf_mem_kreclaimable(void) | ^ | static kernel/bpf-rvi/common_kfuncs.c:181:27: warning: no previous prototype for function 'bpf_mem_totalcma' [-Wmissing-prototypes] 181 | __bpf_kfunc unsigned long bpf_mem_totalcma(void) | ^ kernel/bpf-rvi/common_kfuncs.c:181:13: note: declare 'static' if the function is not intended to be used outside of this translation unit 181 | __bpf_kfunc unsigned long bpf_mem_totalcma(void) | ^ | static kernel/bpf-rvi/common_kfuncs.c:186:27: warning: no previous prototype for function 'bpf_mem_freecma' [-Wmissing-prototypes] 186 | __bpf_kfunc unsigned long bpf_mem_freecma(void) | ^ kernel/bpf-rvi/common_kfuncs.c:186:13: note: declare 'static' if the function is not intended to be used outside of this translation unit 186 | __bpf_kfunc unsigned long bpf_mem_freecma(void) | ^ | static kernel/bpf-rvi/common_kfuncs.c:201:17: warning: no previous prototype for function 'bpf_hugetlb_report_meminfo' [-Wmissing-prototypes] 201 | __bpf_kfunc int bpf_hugetlb_report_meminfo(struct bpf_mem_hugepage *hugepage_info) | ^ kernel/bpf-rvi/common_kfuncs.c:201:13: note: declare 'static' if the function is not intended to be used outside of this translation unit 201 | __bpf_kfunc int bpf_hugetlb_report_meminfo(struct bpf_mem_hugepage *hugepage_info) | ^ | static kernel/bpf-rvi/common_kfuncs.c:239:27: warning: no previous prototype for function 'bpf_mem_failure' [-Wmissing-prototypes] 239 | __bpf_kfunc unsigned long bpf_mem_failure(void) | ^ kernel/bpf-rvi/common_kfuncs.c:239:13: note: declare 'static' if the function is not intended to be used outside of this translation unit 239 | __bpf_kfunc unsigned long bpf_mem_failure(void) | ^ | static kernel/bpf-rvi/common_kfuncs.c:245:27: warning: no previous prototype for function 'bpf_mem_percpu' [-Wmissing-prototypes] 245 | __bpf_kfunc unsigned long bpf_mem_percpu(void) | ^ kernel/bpf-rvi/common_kfuncs.c:245:13: note: declare 'static' if the function is not intended to be used outside of this translation unit 245 | __bpf_kfunc unsigned long bpf_mem_percpu(void) | ^ | static
kernel/bpf-rvi/common_kfuncs.c:250:27: warning: no previous prototype for function 'bpf_mem_commit_limit' [-Wmissing-prototypes] 250 | __bpf_kfunc unsigned long bpf_mem_commit_limit(void) | ^ kernel/bpf-rvi/common_kfuncs.c:250:13: note: declare 'static' if the function is not intended to be used outside of this translation unit 250 | __bpf_kfunc unsigned long bpf_mem_commit_limit(void) | ^ | static kernel/bpf-rvi/common_kfuncs.c:254:27: warning: no previous prototype for function 'bpf_mem_committed' [-Wmissing-prototypes] 254 | __bpf_kfunc unsigned long bpf_mem_committed(void) | ^ kernel/bpf-rvi/common_kfuncs.c:254:13: note: declare 'static' if the function is not intended to be used outside of this translation unit 254 | __bpf_kfunc unsigned long bpf_mem_committed(void) | ^ | static 25 warnings generated.
vim +/bpf_mem_commit_limit +250 kernel/bpf-rvi/common_kfuncs.c 249
250 __bpf_kfunc unsigned long bpf_mem_commit_limit(void) 251 { 252 return vm_commit_limit(); 253 } 254 __bpf_kfunc unsigned long bpf_mem_committed(void) 255 { 256 return vm_memory_committed(); 257 } 258
-- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
participants (1)
-
kernel test robot