linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] percpu: make symbol 'pcpu_free_slot' static
@ 2021-05-14  6:39 Wei Yongjun
  2021-05-14 21:00 ` Dennis Zhou
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2021-05-14  6:39 UTC (permalink / raw)
  To: weiyongjun1, Dennis Zhou, Tejun Heo, Christoph Lameter, Andrew Morton
  Cc: linux-mm, linux-kernel, kernel-janitors, Hulk Robot

The sparse tool complains as follows:

mm/percpu.c:138:5: warning:
 symbol 'pcpu_free_slot' was not declared. Should it be static?

This symbol is not used outside of percpu.c, so marks it static.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 mm/percpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/percpu.c b/mm/percpu.c
index a257c3efdf18..73c249f3b6a3 100644
--- a/mm/percpu.c
+++ b/mm/percpu.c
@@ -135,7 +135,7 @@ static int pcpu_unit_size __ro_after_init;
 static int pcpu_nr_units __ro_after_init;
 static int pcpu_atom_size __ro_after_init;
 int pcpu_nr_slots __ro_after_init;
-int pcpu_free_slot __ro_after_init;
+static int pcpu_free_slot __ro_after_init;
 int pcpu_sidelined_slot __ro_after_init;
 int pcpu_to_depopulate_slot __ro_after_init;
 static size_t pcpu_chunk_struct_size __ro_after_init;



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

* Re: [PATCH -next] percpu: make symbol 'pcpu_free_slot' static
  2021-05-14  6:39 [PATCH -next] percpu: make symbol 'pcpu_free_slot' static Wei Yongjun
@ 2021-05-14 21:00 ` Dennis Zhou
  0 siblings, 0 replies; 2+ messages in thread
From: Dennis Zhou @ 2021-05-14 21:00 UTC (permalink / raw)
  To: Wei Yongjun
  Cc: Tejun Heo, Christoph Lameter, Andrew Morton, linux-mm,
	linux-kernel, kernel-janitors, Hulk Robot

Hello,

On Fri, May 14, 2021 at 06:39:52AM +0000, Wei Yongjun wrote:
> The sparse tool complains as follows:
> 
> mm/percpu.c:138:5: warning:
>  symbol 'pcpu_free_slot' was not declared. Should it be static?
> 
> This symbol is not used outside of percpu.c, so marks it static.
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
>  mm/percpu.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/percpu.c b/mm/percpu.c
> index a257c3efdf18..73c249f3b6a3 100644
> --- a/mm/percpu.c
> +++ b/mm/percpu.c
> @@ -135,7 +135,7 @@ static int pcpu_unit_size __ro_after_init;
>  static int pcpu_nr_units __ro_after_init;
>  static int pcpu_atom_size __ro_after_init;
>  int pcpu_nr_slots __ro_after_init;
> -int pcpu_free_slot __ro_after_init;
> +static int pcpu_free_slot __ro_after_init;
>  int pcpu_sidelined_slot __ro_after_init;
>  int pcpu_to_depopulate_slot __ro_after_init;
>  static size_t pcpu_chunk_struct_size __ro_after_init;
> 

Ah that's my bad. I've applied this for-5.14.

Thanks,
Dennis


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

end of thread, other threads:[~2021-05-14 21:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-14  6:39 [PATCH -next] percpu: make symbol 'pcpu_free_slot' static Wei Yongjun
2021-05-14 21:00 ` Dennis Zhou

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).