nvmem: layouts: sl28vpd: set varaiable sl28vpd_layout storage-class-specifier to...
authorTom Rix <trix@redhat.com>
Tue, 4 Apr 2023 17:21:48 +0000 (18:21 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Apr 2023 17:41:13 +0000 (19:41 +0200)
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 <trix@redhat.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20230404172148.82422-41-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/nvmem/layouts/sl28vpd.c

index 9cc1715c2fd51f1cae1198d473a68c7a84e236ca..05671371f63166edb28231ef12747fe40d22913d 100644 (file)
@@ -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,