tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: ef2982312942ba96fb8217df5d832051bae4afd2 commit: b171c3e6cde7063e53a50b33e04101d25338d87d [4988/21589] sched/cputime: add cmdline account_irqtime_to_task config: x86_64-randconfig-121-20240125 (attached as .config) compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18) reproduce (this is a W=1 build): (attached as 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/202401291933.XaMvht5n-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
kernel/sched/core.c:132:6: sparse: sparse: symbol 'account_irqtime_to_task' was not declared. Should it be static?
kernel/sched/core.c:521:9: sparse: sparse: incompatible types in comparison expression (different address spaces): kernel/sched/core.c:521:9: sparse: struct sched_domain [noderef] __rcu * kernel/sched/core.c:521:9: sparse: struct sched_domain * kernel/sched/core.c:1630:17: sparse: sparse: incompatible types in comparison expression (different address spaces): kernel/sched/core.c:1630:17: sparse: struct sched_domain [noderef] __rcu * kernel/sched/core.c:1630:17: sparse: struct sched_domain * kernel/sched/core.c:1818:27: sparse: sparse: incompatible types in comparison expression (different address spaces): kernel/sched/core.c:1818:27: sparse: struct task_struct [noderef] __rcu * kernel/sched/core.c:1818:27: sparse: struct task_struct * kernel/sched/core.c:6536:11: sparse: sparse: symbol 'min_cfs_quota_period' was not declared. Should it be static? kernel/sched/core.c:6616:5: sparse: sparse: symbol 'tg_set_cfs_quota' was not declared. Should it be static? kernel/sched/core.c:6629:6: sparse: sparse: symbol 'tg_get_cfs_quota' was not declared. Should it be static? kernel/sched/core.c:6642:5: sparse: sparse: symbol 'tg_set_cfs_period' was not declared. Should it be static? kernel/sched/core.c:6652:6: sparse: sparse: symbol 'tg_get_cfs_period' was not declared. Should it be static? In file included from kernel/sched/core.c:8: In file included from kernel/sched/sched.h:39: In file included from include/linux/blkdev.h:16: include/linux/pagemap.h:401:21: warning: cast from 'int (*)(struct file *, struct page *)' to 'filler_t *' (aka 'int (*)(void *, struct page *)') converts to incompatible function type [-Wcast-function-type-strict] 401 | filler_t *filler = (filler_t *)mapping->a_ops->readpage; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from kernel/sched/core.c:8: kernel/sched/sched.h:1154:15: warning: cast from 'void (*)(struct rq *)' to 'void (*)(struct callback_head *)' converts to incompatible function type [-Wcast-function-type-strict] 1154 | head->func = (void (*)(struct callback_head *))func; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/sched/core.c:1571:6: warning: no previous prototype for function 'sched_set_stop_task' [-Wmissing-prototypes] 1571 | void sched_set_stop_task(int cpu, struct task_struct *stop) | ^ kernel/sched/core.c:1571:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 1571 | void sched_set_stop_task(int cpu, struct task_struct *stop) | ^ | static kernel/sched/core.c:2743:10: warning: cast from 'void (*)(struct callback_head *)' to 'void (*)(struct rq *)' converts to incompatible function type [-Wcast-function-type-strict] 2743 | func = (void (*)(struct rq *))head->func; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/sched/core.c:3702:35: warning: no previous prototype for function 'preempt_schedule_irq' [-Wmissing-prototypes] 3702 | asmlinkage __visible void __sched preempt_schedule_irq(void) | ^ kernel/sched/core.c:3702:22: note: declare 'static' if the function is not intended to be used outside of this translation unit 3702 | asmlinkage __visible void __sched preempt_schedule_irq(void) | ^ | static kernel/sched/core.c:6616:5: warning: no previous prototype for function 'tg_set_cfs_quota' [-Wmissing-prototypes] 6616 | int tg_set_cfs_quota(struct task_group *tg, long cfs_quota_us) | ^ kernel/sched/core.c:6616:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 6616 | int tg_set_cfs_quota(struct task_group *tg, long cfs_quota_us) | ^ | static kernel/sched/core.c:6629:6: warning: no previous prototype for function 'tg_get_cfs_quota' [-Wmissing-prototypes] 6629 | long tg_get_cfs_quota(struct task_group *tg) | ^ kernel/sched/core.c:6629:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 6629 | long tg_get_cfs_quota(struct task_group *tg) | ^ | static kernel/sched/core.c:6642:5: warning: no previous prototype for function 'tg_set_cfs_period' [-Wmissing-prototypes] 6642 | int tg_set_cfs_period(struct task_group *tg, long cfs_period_us) | ^ kernel/sched/core.c:6642:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 6642 | int tg_set_cfs_period(struct task_group *tg, long cfs_period_us) | ^ | static kernel/sched/core.c:6652:6: warning: no previous prototype for function 'tg_get_cfs_period' [-Wmissing-prototypes] 6652 | long tg_get_cfs_period(struct task_group *tg) | ^ kernel/sched/core.c:6652:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 6652 | long tg_get_cfs_period(struct task_group *tg) | ^ | static 9 warnings generated.
vim +/account_irqtime_to_task +132 kernel/sched/core.c
3e71a462dd483c Peter Zijlstra 2016-04-28 128 535b9552bb81ee Ingo Molnar 2017-02-01 129 /* 535b9552bb81ee Ingo Molnar 2017-02-01 130 * RQ-clock updating methods: 535b9552bb81ee Ingo Molnar 2017-02-01 131 */ b171c3e6cde706 Xie XiuQi 2019-04-17 @132 bool account_irqtime_to_task __read_mostly; b171c3e6cde706 Xie XiuQi 2019-04-17 133 static int __init setup_account_irqtime(char *str) b171c3e6cde706 Xie XiuQi 2019-04-17 134 { b171c3e6cde706 Xie XiuQi 2019-04-17 135 account_irqtime_to_task = true; b171c3e6cde706 Xie XiuQi 2019-04-17 136 b171c3e6cde706 Xie XiuQi 2019-04-17 137 return 0; b171c3e6cde706 Xie XiuQi 2019-04-17 138 } b171c3e6cde706 Xie XiuQi 2019-04-17 139 __setup("account-irqtime-to-task", setup_account_irqtime); 535b9552bb81ee Ingo Molnar 2017-02-01 140