nvmem: layouts: sl28vpd: set varaiable sl28vpd_layout storage-class-specifier to static
Subsystems (2)
PATCH 1/1 nvmem: layouts: sl28vpd: set varaiable sl28vpd_layout storage-class-specifier to static
smatch reports drivers/nvmem/layouts/sl28vpd.c:144:21: warning: symbol
'sl28vpd_layout' was not declared. Should it be static?
This variable is only used in one file so it should be static.
--- drivers/nvmem/layouts/sl28vpd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvmem/layouts/sl28vpd.c +1 -1
@@ -141,7 +141,7 @@ static const struct of_device_id sl28vpd_of_match_table[] = { };MODULE_DEVICE_TABLE (of, sl28vpd_of_match_table); -struct nvmem_layout sl28vpd_layout = { +static struct nvmem_layout sl28vpd_layout = { .name ="sl28-vpd" , .of_match_table = sl28vpd_of_match_table, .add_cells = sl28vpd_add_cells,
Signature · 1 line
2.27.0
Am 2023-04-04 18:36, schrieb Tom Rix:
Quoted 7 lines
smatch reports
drivers/nvmem/layouts/sl28vpd.c:144:21: warning: symbol
'sl28vpd_layout' was not declared. Should it be static?This variable is only used in one file so it should be static.
Signed-off-by Tom Rix <[email protected]>
Fixes tag?
-michael
Quoted 11 lines · Michael Walle
Am 2023-04-04 18:36, schrieb Tom Rix:
Quoted 7 lines
smatch reports
drivers/nvmem/layouts/sl28vpd.c:144:21: warning: symbol 'sl28vpd_layout' was not declared. Should it be static?This variable is only used in one file so it should be static.
Signed-off-by Tom Rix <[email protected]>Fixes tag?
I am cleaning all of the similar reports by smatch, there is a couple hundred.
Because the code works as-is, I do not consider them broken and needing fixes tags.
However I do not mind adding then if they are required.
Tom
Quoted 4 lines
Reviewed-by Michael Walle <[email protected]>-michael