From: kernel test robot <lkp@intel.com>
To: kernel@openeuler.org, GONG Ruiqi <gongruiqi1@huawei.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [openeuler:OLK-6.6 2679/2679] kernel/bpf-rvi/common_kfuncs.c:238:27: warning: no previous prototype for function 'bpf_mem_failure'
Date: Fri, 15 Aug 2025 22:09:37 +0800 [thread overview]
Message-ID: <202508152209.qAp1xBAt-lkp@intel.com> (raw)
tree: https://gitee.com/openeuler/kernel.git OLK-6.6
head: 54d96ebb93c9ff0573fe16586a47778ebe26de32
commit: 09893ff02def3af3147aff056dca7bee71c432f0 [2679/2679] bpf-rvi: Add bpf_mem_failure kfunc
config: loongarch-allmodconfig (https://download.01.org/0day-ci/archive/20250815/202508152209.qAp1xBAt-lkp@intel.com/config)
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/202508152209.qAp1xBAt-lkp@intel.com/reproduce)
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/202508152209.qAp1xBAt-lkp@intel.com/
All warnings (new ones prefixed by >>):
| ^
| static
kernel/bpf-rvi/common_kfuncs.c:118:18: warning: no previous prototype for function 'bpf_get_boottime_timens' [-Wmissing-prototypes]
118 | __bpf_kfunc void bpf_get_boottime_timens(struct task_struct *tsk, struct timespec64 *boottime)
| ^
kernel/bpf-rvi/common_kfuncs.c:118:13: note: declare 'static' if the function is not intended to be used outside of this translation unit
118 | __bpf_kfunc void bpf_get_boottime_timens(struct task_struct *tsk, struct timespec64 *boottime)
| ^
| 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
22 warnings generated.
vim +/bpf_mem_failure +238 kernel/bpf-rvi/common_kfuncs.c
231
232 #ifdef CONFIG_MEMORY_FAILURE
233 __bpf_kfunc unsigned long bpf_mem_failure(void)
234 {
235 return atomic_long_read(&num_poisoned_pages) << (PAGE_SHIFT - 10);
236 }
237 #else
> 238 __bpf_kfunc unsigned long bpf_mem_failure(void)
239 {
240 return 0;
241 }
242 #endif
243
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2025-08-15 14:10 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202508152209.qAp1xBAt-lkp@intel.com \
--to=lkp@intel.com \
--cc=gongruiqi1@huawei.com \
--cc=kernel@openeuler.org \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.