tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 95bc69473a373c2e578d4fc39734e5811a03ead3 commit: 6f06e093b3708dcee5b7e4f0478e0206bc601da1 [1540/1540] sched/ebpf: Support task selection programmable config: arm64-allmodconfig (https://download.01.org/0day-ci/archive/20241129/202411290245.YQeCUdgI-lkp@i...) compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 592c0fe55f6d9a811028b5f3507be91458ab2713) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241129/202411290245.YQeCUdgI-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/202411290245.YQeCUdgI-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from kernel/sched/build_utility.c:24: In file included from include/linux/cpuset.h:17: In file included from include/linux/mm.h:2247: include/linux/vmstat.h:508:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 508 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 509 | item]; | ~~~~ include/linux/vmstat.h:515:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 515 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 516 | NR_VM_NUMA_EVENT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~~ include/linux/vmstat.h:522:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 522 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_" | ~~~~~~~~~~~ ^ ~~~ include/linux/vmstat.h:527:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 527 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 528 | NR_VM_NUMA_EVENT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~~ include/linux/vmstat.h:536:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 536 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 537 | NR_VM_NUMA_EVENT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~~ In file included from kernel/sched/build_utility.c:113:
kernel/sched/bpf_sched.c:187:17: warning: no previous prototype for function '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:187:13: note: declare 'static' if the function is not intended to be used outside of this translation unit 187 | __bpf_kfunc int bpf_sched_entity_is_task(struct sched_entity *se) | ^ | static
kernel/sched/bpf_sched.c:195:33: warning: no previous prototype for function '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:195:13: note: declare 'static' if the function is not intended to be used outside of this translation unit 195 | __bpf_kfunc struct task_struct *bpf_sched_entity_to_task(struct sched_entity *se) | ^ | static
kernel/sched/bpf_sched.c:203:18: warning: no previous prototype for function 'bpf_sched_tag_of_entity' [-Wmissing-prototypes]
203 | __bpf_kfunc long bpf_sched_tag_of_entity(struct sched_entity *se) | ^ kernel/sched/bpf_sched.c:203:13: note: declare 'static' if the function is not intended to be used outside of this translation unit 203 | __bpf_kfunc long bpf_sched_tag_of_entity(struct sched_entity *se) | ^ | static 8 warnings generated.
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