[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20260116-fix-bpf_rstat_flush-v1-1-b068c230fdff@gmail.com>
Date: Fri, 16 Jan 2026 03:12:14 +0900
From: Ryota Sakamoto <sakamo.ryota@...il.com>
To: Tejun Heo <tj@...nel.org>, Johannes Weiner <hannes@...xchg.org>,
Michal Koutný <mkoutny@...e.com>
Cc: cgroups@...r.kernel.org, linux-kernel@...r.kernel.org,
bpf@...r.kernel.org, Ryota Sakamoto <sakamo.ryota@...il.com>
Subject: [PATCH] cgroup/rstat: fix missing prototype warning for
bpf_rstat_flush()
Add the prototype to cgroup-internal.h to resolve the Sparse warning.
The function bpf_rstat_flush() is defined as __weak and global in
kernel/cgroup/rstat.c, but lack of prototype in header file causes warning
with Sparse (C=1):
kernel/cgroup/rstat.c:342:22: warning: symbol 'bpf_rstat_flush' was not declared. Should it be static?
Signed-off-by: Ryota Sakamoto <sakamo.ryota@...il.com>
---
kernel/cgroup/cgroup-internal.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/kernel/cgroup/cgroup-internal.h b/kernel/cgroup/cgroup-internal.h
index 22051b4f1ccbc0812641e4716b7a5b5f7138bbc9..ecb2b3a2f06ffcc3d747adf666a6134cc54059e1 100644
--- a/kernel/cgroup/cgroup-internal.h
+++ b/kernel/cgroup/cgroup-internal.h
@@ -277,6 +277,7 @@ int css_rstat_init(struct cgroup_subsys_state *css);
void css_rstat_exit(struct cgroup_subsys_state *css);
int ss_rstat_init(struct cgroup_subsys *ss);
void cgroup_base_stat_cputime_show(struct seq_file *seq);
+void bpf_rstat_flush(struct cgroup *cgrp, struct cgroup *parent, int cpu);
/*
* namespace.c
---
base-commit: 944aacb68baf7624ab8d277d0ebf07f025ca137c
change-id: 20260116-fix-bpf_rstat_flush-66c1a7582b21
Best regards,
--
Ryota Sakamoto <sakamo.ryota@...il.com>
Powered by blists - more mailing lists