tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 95bc69473a373c2e578d4fc39734e5811a03ead3 commit: 6f06e093b3708dcee5b7e4f0478e0206bc601da1 [1540/1540] sched/ebpf: Support task selection programmable config: loongarch-allyesconfig (https://download.01.org/0day-ci/archive/20241128/202411282229.dFuV8vuC-lkp@i...) compiler: loongarch64-linux-gcc (GCC) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241128/202411282229.dFuV8vuC-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/202411282229.dFuV8vuC-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from kernel/sched/build_utility.c:113:
kernel/sched/bpf_sched.c:187:17: warning: no previous prototype for 'bpf_sched_entity_is_task' [-Wmissing-prototypes]
187 | __bpf_kfunc int bpf_sched_entity_is_task(struct sched_entity *se) | ^~~~~~~~~~~~~~~~~~~~~~~~
kernel/sched/bpf_sched.c:195:33: warning: no previous prototype for 'bpf_sched_entity_to_task' [-Wmissing-prototypes]
195 | __bpf_kfunc struct task_struct *bpf_sched_entity_to_task(struct sched_entity *se) | ^~~~~~~~~~~~~~~~~~~~~~~~
kernel/sched/bpf_sched.c:203:18: warning: no previous prototype for 'bpf_sched_tag_of_entity' [-Wmissing-prototypes]
203 | __bpf_kfunc long bpf_sched_tag_of_entity(struct sched_entity *se) | ^~~~~~~~~~~~~~~~~~~~~~~
vim +/bpf_sched_entity_is_task +187 kernel/sched/bpf_sched.c
186
187 __bpf_kfunc int bpf_sched_entity_is_task(struct sched_entity *se)
188 { 189 if (!se) 190 return -EINVAL; 191 192 return entity_is_task(se); 193 } 194
195 __bpf_kfunc struct task_struct *bpf_sched_entity_to_task(struct sched_entity *se)
196 { 197 if (se && entity_is_task(se)) 198 return task_of(se); 199 200 return NULL; 201 } 202
203 __bpf_kfunc long bpf_sched_tag_of_entity(struct sched_entity *se)
204 { 205 if (!se) 206 return -EINVAL; 207 208 if (entity_is_task(se)) 209 return task_of(se)->tag; 210 211 return group_cfs_rq(se)->tg->tag; 212 } 213