[openeuler:OLK-5.10 3164/3164] kernel/sched/fair.c:9944:43: error: incomplete definition of type 'struct task_group'

Hi Cheng, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: 2631a43115d05f216c64dbf901afa2b4bfdf13f5 commit: 433c0b72564239cf3086f563d5ca32a10e4ffd3f [3164/3164] sched/fair: Count the number of tasks marked as steal_task on cfs_rq config: x86_64-randconfig-104-20250827 (https://download.01.org/0day-ci/archive/20250827/202508271837.ae2GMAYR-lkp@i...) compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250827/202508271837.ae2GMAYR-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/202508271837.ae2GMAYR-lkp@intel.com/ All errors (new ones prefixed by >>): kernel/sched/fair.c:4483:31: error: implicit declaration of function 'is_tg_steal' [-Werror,-Wimplicit-function-declaration] 4483 | return group_steal_used() && is_tg_steal(steal_task); | ^ kernel/sched/fair.c:6013:6: warning: no previous prototype for function 'init_cfs_bandwidth' [-Wmissing-prototypes] 6013 | void init_cfs_bandwidth(struct cfs_bandwidth *cfs_b) {} | ^ kernel/sched/fair.c:6013:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 6013 | void init_cfs_bandwidth(struct cfs_bandwidth *cfs_b) {} | ^ | static kernel/sched/fair.c:9944:29: error: implicit declaration of function 'is_tg_steal' [-Werror,-Wimplicit-function-declaration] 9944 | if (group_steal_used() && !is_tg_steal(tg->steal_task)) | ^
kernel/sched/fair.c:9944:43: error: incomplete definition of type 'struct task_group' 9944 | if (group_steal_used() && !is_tg_steal(tg->steal_task)) | ~~^ include/linux/sched.h:69:8: note: forward declaration of 'struct task_group' 69 | struct task_group; | ^ kernel/sched/fair.c:13961:6: warning: no previous prototype for function 'free_fair_sched_group' [-Wmissing-prototypes] 13961 | void free_fair_sched_group(struct task_group *tg) { } | ^ kernel/sched/fair.c:13961:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 13961 | void free_fair_sched_group(struct task_group *tg) { } | ^ | static kernel/sched/fair.c:13963:5: warning: no previous prototype for function 'alloc_fair_sched_group' [-Wmissing-prototypes] 13963 | int alloc_fair_sched_group(struct task_group *tg, struct task_group *parent) | ^ kernel/sched/fair.c:13963:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 13963 | int alloc_fair_sched_group(struct task_group *tg, struct task_group *parent) | ^ | static kernel/sched/fair.c:13968:6: warning: no previous prototype for function 'online_fair_sched_group' [-Wmissing-prototypes] 13968 | void online_fair_sched_group(struct task_group *tg) { } | ^ kernel/sched/fair.c:13968:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 13968 | void online_fair_sched_group(struct task_group *tg) { } | ^ | static kernel/sched/fair.c:13970:6: warning: no previous prototype for function 'unregister_fair_sched_group' [-Wmissing-prototypes] 13970 | void unregister_fair_sched_group(struct task_group *tg) { } | ^ kernel/sched/fair.c:13970:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 13970 | void unregister_fair_sched_group(struct task_group *tg) { } | ^ | static 5 warnings and 3 errors generated.
vim +9944 kernel/sched/fair.c 9929 9930 #ifdef CONFIG_SCHED_STEAL 9931 /* 9932 * Return true if task @p can migrate from @rq to @dst_rq in the same LLC. 9933 * No need to test for co-locality, and no need to test task_hot(), as sharing 9934 * LLC provides cache warmth at that level. 9935 */ 9936 static bool 9937 can_migrate_task_llc(struct task_struct *p, struct rq *rq, struct rq *dst_rq) 9938 { 9939 int dst_cpu = dst_rq->cpu; 9940 struct task_group *tg = task_group(p); 9941 9942 lockdep_assert_rq_held(rq); 9943
9944 if (group_steal_used() && !is_tg_steal(tg->steal_task)) 9945 return false; 9946 9947 if (throttled_lb_pair(tg, cpu_of(rq), dst_cpu)) 9948 return false; 9949 9950 if (!cpumask_test_cpu(dst_cpu, p->cpus_ptr)) { 9951 schedstat_inc(p->se.statistics.nr_failed_migrations_affine); 9952 return false; 9953 } 9954 9955 if (task_running(rq, p)) { 9956 schedstat_inc(p->se.statistics.nr_failed_migrations_running); 9957 return false; 9958 } 9959 9960 return true; 9961 } 9962 #endif 9963
-- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
participants (1)
-
kernel test robot