lkml.org 
[lkml]   [2022]   [Apr]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] nvmem: change sp_otp_v0 from global to static
From


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,
> };
>

\
 
 \ /
  Last update: 2022-04-29 11:35    [W:0.035 / U:0.512 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site