* [PATCH] nvmem: change sp_otp_v0 from global to static
@ 2022-04-03 13:39 Tom Rix
2022-04-29 9:34 ` Srinivas Kandagatla
0 siblings, 1 reply; 2+ messages in thread
From: Tom Rix @ 2022-04-03 13:39 UTC (permalink / raw)
To: vincent.sunplus, srinivas.kandagatla; +Cc: linux-kernel, 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_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 <trix@redhat.com>
---
drivers/nvmem/sunplus-ocotp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nvmem/sunplus-ocotp.c b/drivers/nvmem/sunplus-ocotp.c
index 2dc59c22eb55..e0b11e13f5f8 100644
--- a/drivers/nvmem/sunplus-ocotp.c
+++ b/drivers/nvmem/sunplus-ocotp.c
@@ -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,
};
--
2.27.0
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] nvmem: change sp_otp_v0 from global to static
2022-04-03 13:39 [PATCH] nvmem: change sp_otp_v0 from global to static Tom Rix
@ 2022-04-29 9:34 ` Srinivas Kandagatla
0 siblings, 0 replies; 2+ messages in thread
From: Srinivas Kandagatla @ 2022-04-29 9:34 UTC (permalink / raw)
To: Tom Rix, vincent.sunplus; +Cc: linux-kernel
On 03/04/2022 14:39, Tom Rix wrote:
> 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 <trix@redhat.com>
> ---
There is already a patch for this in next.
--srini
> drivers/nvmem/sunplus-ocotp.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/nvmem/sunplus-ocotp.c b/drivers/nvmem/sunplus-ocotp.c
> index 2dc59c22eb55..e0b11e13f5f8 100644
> --- a/drivers/nvmem/sunplus-ocotp.c
> +++ b/drivers/nvmem/sunplus-ocotp.c
> @@ -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,
> };
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-04-29 9:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-03 13:39 [PATCH] nvmem: change sp_otp_v0 from global to static Tom Rix
2022-04-29 9:34 ` Srinivas Kandagatla
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®