psi: Make symbol 'psi_cgroups_enabled' static
Subsystems (3)
PATCH 1/1 psi: Make symbol 'psi_cgroups_enabled' static
The sparse tool complains as follows:
kernel/sched/psi.c:151:1: warning:
symbol 'psi_cgroups_enabled' was not declared. Should it be static?
This symbol is not used outside of psi.c, so marks it static.
Fixes 3958e2d0c34e ("cgroup: make per-cgroup pressure stall tracking configurable")
Reported-by Hulk Robot <[email protected]>
Signed-off-by Wei Yongjun <[email protected]>
--- kernel/sched/psi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/sched/psi.c +1 -1
@@ -148,7 +148,7 @@static int psi_bug__read_mostly ;DEFINE_STATIC_KEY_FALSE (psi_disabled); -DEFINE_STATIC_KEY_TRUE (psi_cgroups_enabled); +static DEFINE_STATIC_KEY_TRUE (psi_cgroups_enabled);#ifdef CONFIG_PSI_DEFAULT_DISABLED static bool psi_enable;
Quoted 11 lines · Wei Yongjun
The sparse tool complains as follows:
kernel/sched/psi.c:151:1: warning:
symbol 'psi_cgroups_enabled' was not declared. Should it be static?This symbol is not used outside of
psi.c, so marks it static.Fixes 3958e2d0c34e ("cgroup: make per-cgroup pressure stall tracking configurable")Reported-by Hulk Robot <[email protected]>Signed-off-by Wei Yongjun <[email protected]>
Reviewed-by Suren Baghdasaryan <[email protected]>
Thanks for reporting!
Tejun, how would to like this to be fixed? Will you take this patch as is, roll it into my change which introduced this warning
(https://lore.kernel.org/patchwork/patch/1435705/) or would you prefer me to resent the original patch with this fix?
Quoted 18 lines
--- kernel/sched/psi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)kernel/sched/psi.c +1
-1@@ -148,7 +148,7 @@static int psi_bug__read_mostly ;DEFINE_STATIC_KEY_FALSE (psi_disabled); -DEFINE_STATIC_KEY_TRUE (psi_cgroups_enabled); +static DEFINE_STATIC_KEY_TRUE (psi_cgroups_enabled);#ifdef CONFIG_PSI_DEFAULT_DISABLED static bool psi_enable;