nvmem: change sp_otp_v0 from global to static
Subsystems (2)
PATCH 1/1 nvmem: change sp_otp_v0 from global to static
Smatch reports this issue sunplus-ocotp.c:74:29: warning: symbol 'sp_otp_v0'
was not declared. Should it be static?
sp_otp_v0 is only used in sunplus-ocotp.c. File scope variables used only in one file should be static. Change sp_otp_v0's storage-class-specifier from global to static.
Signed-off-by Tom Rix <[email protected]>
--- drivers/nvmem/sunplus-ocotp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvmem/sunplus-ocotp.c +1 -1
@@ -71,7 +71,7 @@ struct sp_ocotp_data {int size; }; -const struct sp_ocotp_data sp_otp_v0 = { +static const struct sp_ocotp_data sp_otp_v0 = { .size =QAC628_OTP_SIZE , };
Signature · 1 line
2.27.0
Quoted 11 lines · Tom Rix
Smatch reports this issue sunplus-ocotp.c:74:29: warning: symbol '
sp_otp_v0'
was not declared. Should it be static?
sp_otp_v0is only used insunplus-ocotp.c. File scope variables used only in one file should be static. Change sp_otp_v0's storage-class-specifier from global to static.Signed-off-by Tom Rix <[email protected]>---
There is already a patch for this in next.
--srini
Quoted 16 lines
drivers/nvmem/sunplus-ocotp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/nvmem/sunplus-ocotp.c +1
-1@@ -71,7 +71,7 @@ struct sp_ocotp_data {int size; }; -const struct sp_ocotp_data sp_otp_v0 = { +static const struct sp_ocotp_data sp_otp_v0 = { .size =QAC628_OTP_SIZE , };