Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* [peterz-queue:sched/urgent 2/2] kernel/sched/cputime.c:25:12: error: static declaration of 'sched_clock_irqtime' follows non-static declaration
@ 2025-02-01 14:32 kernel test robot
  2025-02-04  8:49 ` [PATCH] sched: Fix " Yafang Shao
  0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2025-02-01 14:32 UTC (permalink / raw)
  To: Yafang Shao; +Cc: llvm, oe-kbuild-all, Peter Zijlstra, Vincent Guittot

tree:   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/202502012207.b8iyB4Fh-lkp@intel.com/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/202502012207.b8iyB4Fh-lkp@intel.com/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/202502012207.b8iyB4Fh-lkp@intel.com/

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	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] sched: Fix static declaration of 'sched_clock_irqtime' follows non-static declaration
  2025-02-01 14:32 [peterz-queue:sched/urgent 2/2] kernel/sched/cputime.c:25:12: error: static declaration of 'sched_clock_irqtime' follows non-static declaration kernel test robot
@ 2025-02-04  8:49 ` Yafang Shao
  2025-02-04 11:32   ` Peter Zijlstra
  0 siblings, 1 reply; 3+ messages in thread
From: Yafang Shao @ 2025-02-04  8:49 UTC (permalink / raw)
  To: lkp; +Cc: laoar.shao, llvm, oe-kbuild-all, peterz, vincent.guittot

kernel test robot reported the following error:

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

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202502012207.b8iyB4Fh-lkp@intel.com/
Signed-off-by: Yafang Shao <laoar.shao@gmail.com>
---
 kernel/sched/cputime.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/cputime.c b/kernel/sched/cputime.c
index c7904ce2345a..6dab4854c6c0 100644
--- a/kernel/sched/cputime.c
+++ b/kernel/sched/cputime.c
@@ -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)
 {
-- 
2.37.1 (Apple Git-137.1)


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] sched: Fix static declaration of 'sched_clock_irqtime' follows non-static declaration
  2025-02-04  8:49 ` [PATCH] sched: Fix " Yafang Shao
@ 2025-02-04 11:32   ` Peter Zijlstra
  0 siblings, 0 replies; 3+ messages in thread
From: Peter Zijlstra @ 2025-02-04 11:32 UTC (permalink / raw)
  To: Yafang Shao; +Cc: lkp, llvm, oe-kbuild-all, vincent.guittot

On Tue, Feb 04, 2025 at 04:49:15PM +0800, Yafang Shao wrote:
> kernel test robot reported the following error:
> 
> 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
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202502012207.b8iyB4Fh-lkp@intel.com/
> Signed-off-by: Yafang Shao <laoar.shao@gmail.com>

Once the build robot complained I dropped the patch. This don't apply to
anything.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-02-04 11:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-01 14:32 [peterz-queue:sched/urgent 2/2] kernel/sched/cputime.c:25:12: error: static declaration of 'sched_clock_irqtime' follows non-static declaration kernel test robot
2025-02-04  8:49 ` [PATCH] sched: Fix " Yafang Shao
2025-02-04 11:32   ` Peter Zijlstra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox