2023-04-15 15:52:51

by Tom Rix

[permalink] [raw]
Subject: [PATCH] drm/amd/display: set variable dccg314_init storage-class-specifier to static

smatch reports
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn314/dcn314_dccg.c:277:6: warning: symbol
'dccg314_init' was not declared. Should it be static?

This variable is only used in one file so should be static.

Signed-off-by: Tom Rix <[email protected]>
---
drivers/gpu/drm/amd/display/dc/dcn314/dcn314_dccg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dcn314/dcn314_dccg.c b/drivers/gpu/drm/amd/display/dc/dcn314/dcn314_dccg.c
index 6f879265ad9c..de7bfba2c179 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn314/dcn314_dccg.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn314/dcn314_dccg.c
@@ -274,7 +274,7 @@ static void dccg314_set_dpstreamclk(
}
}

-void dccg314_init(struct dccg *dccg)
+static void dccg314_init(struct dccg *dccg)
{
int otg_inst;

--
2.27.0


2023-04-17 14:58:59

by Hamza Mahfooz

[permalink] [raw]
Subject: Re: [PATCH] drm/amd/display: set variable dccg314_init storage-class-specifier to static

On 4/15/23 11:17, Tom Rix wrote:
> smatch reports
> drivers/gpu/drm/amd/amdgpu/../display/dc/dcn314/dcn314_dccg.c:277:6: warning: symbol
> 'dccg314_init' was not declared. Should it be static?
>
> This variable is only used in one file so should be static.
>
> Signed-off-by: Tom Rix <[email protected]>

Applied, thanks!

> ---
> drivers/gpu/drm/amd/display/dc/dcn314/dcn314_dccg.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/dcn314/dcn314_dccg.c b/drivers/gpu/drm/amd/display/dc/dcn314/dcn314_dccg.c
> index 6f879265ad9c..de7bfba2c179 100644
> --- a/drivers/gpu/drm/amd/display/dc/dcn314/dcn314_dccg.c
> +++ b/drivers/gpu/drm/amd/display/dc/dcn314/dcn314_dccg.c
> @@ -274,7 +274,7 @@ static void dccg314_set_dpstreamclk(
> }
> }
>
> -void dccg314_init(struct dccg *dccg)
> +static void dccg314_init(struct dccg *dccg)
> {
> int otg_inst;
>
--
Hamza