kernel/sched/cputime.c:25:12: error: static declaration of 'sched_clock_irqtime' follows non-static declaration
kernel test robot
build bottree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git sched/urgent head: efd5bd3144b76ff6eab5443d16df9797d9d7f4cd commit: efd5bd3144b76ff6eab5443d16df9797d9d7f4cd [2/2] sched: Don't define sched_clock_irqtime as static key config: arm-randconfig-002-20250201 (https://download.01.org/0day-ci/archive/20250201/[email protected]/config) compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250201/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All errors (new ones prefixed by >>):
In file included from kernel/sched/build_policy.c:59:
>> kernel/sched/cputime.c:25:12: error: static declaration of 'sched_clock_irqtime' follows non-static declaration
25 | static int sched_clock_irqtime;
| ^
kernel/sched/sched.h:3262:12: note: previous declaration is here
3262 | extern int sched_clock_irqtime;
| ^1 error generated.
vim +/sched_clock_irqtime +25 kernel/sched/cputime.c
24
> 25 static int sched_clock_irqtime;
26 Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
PATCH 1/1 sched: Fix static declaration of 'sched_clock_irqtime' follows non-static declaration
kernel test robot reported the following error:
All errors (new ones prefixed by >>):
In file included from kernel/sched/build_policy.c:59:
Quoted 1 line
Quoted 1 line
kernel/sched/cputime.c:25:12: error: static declaration of 'sched_clock_irqtime' follows non-static declaration
25 | static int sched_clock_irqtime;
| ^
kernel/sched/sched.h:3262:12: note: previous declaration is here
3262 | extern int sched_clock_irqtime;
| ^1 error generated.
vim +/sched_clock_irqtime +25 kernel/sched/cputime.c
24
Quoted 1 line
25 static int
sched_clock_irqtime;
26
--- kernel/sched/cputime.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/sched/cputime.c +1 -1
@@ -22,7 +22,7 @@*/ DEFINE_PER_CPU(struct irqtime, cpu_irqtime); -static int sched_clock_irqtime; +int sched_clock_irqtime;void enable_sched_clock_irqtime (void ) {
Signature · 1 line
2.37.1 (Apple Git-137.1)
Peter Zijlstra
maintainerRe: [PATCH] sched: Fix static declaration of 'sched_clock_irqtime' follows non-static declaration
Quoted 15 lines · Yafang Shao
kernel test robot reported the following error:
All errors (new ones prefixed by >>):
In file included from
kernel/sched/build_policy.c:59:Quoted 1 line
Quoted 1 line
kernel/sched/cputime.c:25:12: error: static declaration of 'sched_clock_irqtime' follows non-static declaration25 | static int sched_clock_irqtime; | ^ kernel/sched/sched.h:3262:12: note: previous declaration is here 3262 | extern int sched_clock_irqtime; | ^1 error generated.
vim +/sched_clock_irqtime +25
kernel/sched/cputime.c
Quoted 7 lines
24Quoted 1 line
25 static int
sched_clock_irqtime;26Reported-by kernel test robot <[email protected]>Signed-off-by Yafang Shao <[email protected]>
Once the build robot complained I dropped the patch. This don't apply to anything.