All of lore.kernel.org
 help / color / mirror / Atom feed
* [openeuler:OLK-6.6 2679/2679] kernel/sched/cpuacct.c:417:17: warning: no previous prototype for function 'bpf_task_ca_cpuusage'
@ 2025-08-14 18:49 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-08-14 18:49 UTC (permalink / raw)
  To: kernel, GONG Ruiqi; +Cc: oe-kbuild-all

tree:   https://gitee.com/openeuler/kernel.git OLK-6.6
head:   43d8c124ec4624389b14d42595e5f0195e3e5a1d
commit: 00c32c5569d488b6c90f1695175577e35c17c21c [2679/2679] bpf-rvi: cpuacct: Add bpf_task_ca_cpuusage() kfunc
config: loongarch-allmodconfig (https://download.01.org/0day-ci/archive/20250815/202508150236.ujeyp9cP-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/202508150236.ujeyp9cP-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/202508150236.ujeyp9cP-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from kernel/sched/build_utility.c:61:
>> kernel/sched/cpuacct.c:417:17: warning: no previous prototype for function 'bpf_task_ca_cpuusage' [-Wmissing-prototypes]
     417 | __bpf_kfunc u64 bpf_task_ca_cpuusage(struct task_struct *p)
         |                 ^
   kernel/sched/cpuacct.c:417:13: note: declare 'static' if the function is not intended to be used outside of this translation unit
     417 | __bpf_kfunc u64 bpf_task_ca_cpuusage(struct task_struct *p)
         |             ^
         |             static 
   kernel/sched/cpuacct.c:424:18: warning: no previous prototype for function 'bpf_cpuacct_kcpustat_cpu_fetch' [-Wmissing-prototypes]
     424 | __bpf_kfunc void bpf_cpuacct_kcpustat_cpu_fetch(struct kernel_cpustat *dst,
         |                  ^
   kernel/sched/cpuacct.c:424:13: note: declare 'static' if the function is not intended to be used outside of this translation unit
     424 | __bpf_kfunc void bpf_cpuacct_kcpustat_cpu_fetch(struct kernel_cpustat *dst,
         |             ^
         |             static 
   In file included from kernel/sched/build_utility.c:73:
   kernel/sched/debug.c:102:12: warning: no previous prototype for function 'is_prefer_numa' [-Wmissing-prototypes]
     102 | int __weak is_prefer_numa(void)
         |            ^
   kernel/sched/debug.c:102:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     102 | int __weak is_prefer_numa(void)
         | ^
         | static 
   In file included from kernel/sched/build_utility.c:113:
   kernel/sched/bpf_sched.c:186:17: warning: no previous prototype for function 'bpf_sched_entity_is_task' [-Wmissing-prototypes]
     186 | __bpf_kfunc int bpf_sched_entity_is_task(struct sched_entity *se)
         |                 ^
   kernel/sched/bpf_sched.c:186:13: note: declare 'static' if the function is not intended to be used outside of this translation unit
     186 | __bpf_kfunc int bpf_sched_entity_is_task(struct sched_entity *se)
         |             ^
         |             static 
   kernel/sched/bpf_sched.c:194:33: warning: no previous prototype for function 'bpf_sched_entity_to_task' [-Wmissing-prototypes]
     194 | __bpf_kfunc struct task_struct *bpf_sched_entity_to_task(struct sched_entity *se)
         |                                 ^
   kernel/sched/bpf_sched.c:194:13: note: declare 'static' if the function is not intended to be used outside of this translation unit
     194 | __bpf_kfunc struct task_struct *bpf_sched_entity_to_task(struct sched_entity *se)
         |             ^
         |             static 
   kernel/sched/bpf_sched.c:202:18: warning: no previous prototype for function 'bpf_sched_tag_of_entity' [-Wmissing-prototypes]
     202 | __bpf_kfunc long bpf_sched_tag_of_entity(struct sched_entity *se)
         |                  ^
   kernel/sched/bpf_sched.c:202:13: note: declare 'static' if the function is not intended to be used outside of this translation unit
     202 | __bpf_kfunc long bpf_sched_tag_of_entity(struct sched_entity *se)
         |             ^
         |             static 
   kernel/sched/bpf_sched.c:213:17: warning: no previous prototype for function 'bpf_sched_set_task_prefer_nid' [-Wmissing-prototypes]
     213 | __bpf_kfunc int bpf_sched_set_task_prefer_nid(struct task_struct *task, int nid)
         |                 ^
   kernel/sched/bpf_sched.c:213:13: note: declare 'static' if the function is not intended to be used outside of this translation unit
     213 | __bpf_kfunc int bpf_sched_set_task_prefer_nid(struct task_struct *task, int nid)
         |             ^
         |             static 
   7 warnings generated.


vim +/bpf_task_ca_cpuusage +417 kernel/sched/cpuacct.c

   416	
 > 417	__bpf_kfunc u64 bpf_task_ca_cpuusage(struct task_struct *p)
   418	{
   419		if (!p)
   420			return 0;
   421		return cpuusage_read(task_css(p, cpuacct_cgrp_id), NULL);
   422	}
   423	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-08-14 18:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-14 18:49 [openeuler:OLK-6.6 2679/2679] kernel/sched/cpuacct.c:417:17: warning: no previous prototype for function 'bpf_task_ca_cpuusage' kernel test robot

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.