From: zhoumin <teczm@foxmail.com>
To: mingo@redhat.com
Cc: linux-kernel@vger.kernel.org, zhoumin <teczm@foxmail.com>
Subject: [PATCH] cputime:make function static
Date: Mon, 20 Oct 2025 23:43:50 +0800 [thread overview]
Message-ID: <tencent_C04F39CA166C38A5502D7CF206688E191307@qq.com> (raw)
Make account_system_time static.
Signed-off-by: zhoumin <teczm@foxmail.com>
---
include/linux/kernel_stat.h | 1 -
kernel/sched/cputime.c | 2 +-
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/include/linux/kernel_stat.h b/include/linux/kernel_stat.h
index b97ce2df376f..815400c81015 100644
--- a/include/linux/kernel_stat.h
+++ b/include/linux/kernel_stat.h
@@ -119,7 +119,6 @@ static inline void kcpustat_cpu_fetch(struct kernel_cpustat *dst, int cpu)
extern void account_user_time(struct task_struct *, u64);
extern void account_guest_time(struct task_struct *, u64);
-extern void account_system_time(struct task_struct *, int, u64);
extern void account_system_index_time(struct task_struct *, u64,
enum cpu_usage_stat);
extern void account_steal_time(u64);
diff --git a/kernel/sched/cputime.c b/kernel/sched/cputime.c
index 6dab4854c6c0..8c74b86f74f5 100644
--- a/kernel/sched/cputime.c
+++ b/kernel/sched/cputime.c
@@ -183,7 +183,7 @@ void account_system_index_time(struct task_struct *p,
* @hardirq_offset: the offset to subtract from hardirq_count()
* @cputime: the CPU time spent in kernel space since the last update
*/
-void account_system_time(struct task_struct *p, int hardirq_offset, u64 cputime)
+static void account_system_time(struct task_struct *p, int hardirq_offset, u64 cputime)
{
int index;
--
2.43.0
next reply other threads:[~2025-10-20 15:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-20 15:43 zhoumin [this message]
2025-10-21 10:52 ` kernel test robot
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=tencent_C04F39CA166C38A5502D7CF206688E191307@qq.com \
--to=teczm@foxmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
/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
all inboxes | Powered by JetHome®