Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
From: Yafang Shao <laoar.shao@gmail.com>
To: lkp@intel.com
Cc: laoar.shao@gmail.com, llvm@lists.linux.dev,
	oe-kbuild-all@lists.linux.dev, peterz@infradead.org,
	vincent.guittot@linaro.org
Subject: [PATCH] sched: Fix static declaration of 'sched_clock_irqtime' follows non-static declaration
Date: Tue,  4 Feb 2025 16:49:15 +0800	[thread overview]
Message-ID: <20250204084915.4887-1-laoar.shao@gmail.com> (raw)
In-Reply-To: <202502012207.b8iyB4Fh-lkp@intel.com>

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)


  reply	other threads:[~2025-02-04  8:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2025-02-04 11:32   ` [PATCH] sched: Fix " Peter Zijlstra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250204084915.4887-1-laoar.shao@gmail.com \
    --to=laoar.shao@gmail.com \
    --cc=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=peterz@infradead.org \
    --cc=vincent.guittot@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox