]> git.itanic.dy.fi Git - linux-stable/commitdiff
percpu: make symbol 'pcpu_free_slot' static
authorWei Yongjun <weiyongjun1@huawei.com>
Fri, 14 May 2021 06:39:52 +0000 (06:39 +0000)
committerDennis Zhou <dennis@kernel.org>
Fri, 14 May 2021 20:57:54 +0000 (20:57 +0000)
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>
Signed-off-by: Dennis Zhou <dennis@kernel.org>
mm/percpu.c

index 79eebc80860d952bfc340c615bafa1cac6cc6463..3135e56ce8d4c1f1e633f9d578d6ce9a5c9e35c3 100644 (file)
@@ -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;