kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] psi: Make symbol 'psi_cgroups_enabled' static
@ 2021-06-09 15:04 Wei Yongjun
  2021-06-09 19:56 ` Suren Baghdasaryan
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2021-06-09 15:04 UTC (permalink / raw)
  To: weiyongjun1, Suren Baghdasaryan, Johannes Weiner, Ingo Molnar,
	Peter Zijlstra, Juri Lelli, Vincent Guittot
  Cc: linux-kernel, kernel-janitors, Hulk Robot

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 <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 kernel/sched/psi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/psi.c b/kernel/sched/psi.c
index b773cae4c24b..d6e32de2f6af 100644
--- a/kernel/sched/psi.c
+++ b/kernel/sched/psi.c
@@ -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;


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

* Re: [PATCH -next] psi: Make symbol 'psi_cgroups_enabled' static
  2021-06-09 15:04 [PATCH -next] psi: Make symbol 'psi_cgroups_enabled' static Wei Yongjun
@ 2021-06-09 19:56 ` Suren Baghdasaryan
  0 siblings, 0 replies; 2+ messages in thread
From: Suren Baghdasaryan @ 2021-06-09 19:56 UTC (permalink / raw)
  To: Wei Yongjun, Tejun Heo
  Cc: Johannes Weiner, Ingo Molnar, Peter Zijlstra, Juri Lelli,
	Vincent Guittot, LKML, kernel-janitors, Hulk Robot

On Wed, Jun 9, 2021 at 7:54 AM Wei Yongjun <weiyongjun1@huawei.com> wrote:
>
> 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 <hulkci@huawei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

Reviewed-by: Suren Baghdasaryan <surenb@google.com>

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?


> ---
>  kernel/sched/psi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/sched/psi.c b/kernel/sched/psi.c
> index b773cae4c24b..d6e32de2f6af 100644
> --- a/kernel/sched/psi.c
> +++ b/kernel/sched/psi.c
> @@ -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;
>

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

end of thread, other threads:[~2021-06-09 19:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-09 15:04 [PATCH -next] psi: Make symbol 'psi_cgroups_enabled' static Wei Yongjun
2021-06-09 19:56 ` Suren Baghdasaryan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).