percpu: make symbol 'pcpu_free_slot' static
Subsystems (3)
PATCH 1/1 percpu: make symbol 'pcpu_free_slot' static
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 <[email protected]>
Signed-off-by Wei Yongjun <[email protected]>
--- mm/percpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mm/percpu.c +1 -1
@@ -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 ;
Dennis Zhou
maintainerHello,
Quoted 19 lines · Wei Yongjun
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 <[email protected]>Signed-off-by Wei Yongjun <[email protected]>--- mm/percpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)mm/percpu.c +0
-0
mm/percpu.c static int pcpu_unit_size __ro_after_init; · line 141
Quoted 8 lines
mm/percpu.c +1
-1@@ -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