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]>
---
drivers/nvmem/layouts/sl28vpd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nvmem/layouts/sl28vpd.c b/drivers/nvmem/layouts/sl28vpd.c
index 9cc1715c2fd5..05671371f631 100644
--- a/drivers/nvmem/layouts/sl28vpd.c
+++ b/drivers/nvmem/layouts/sl28vpd.c
@@ -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,
--
2.27.0
Am 2023-04-04 18:36, schrieb Tom Rix:
> 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?
Reviewed-by: Michael Walle <[email protected]>
-michael
On 4/4/23 12:09 PM, Michael Walle wrote:
> Am 2023-04-04 18:36, schrieb Tom Rix:
>> 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
> Reviewed-by: Michael Walle <[email protected]>
>
> -michael
>