amd-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/radeon: change cac_weights_* to static
@ 2022-04-23 20:01 Tom Rix
  2022-04-25 17:10 ` Alex Deucher
  0 siblings, 1 reply; 2+ messages in thread
From: Tom Rix @ 2022-04-23 20:01 UTC (permalink / raw)
  To: alexander.deucher, christian.koenig, Xinhui.Pan, airlied, daniel
  Cc: Tom Rix, dri-devel, amd-gfx, linux-kernel

Sparse reports these issues
si_dpm.c:332:26: warning: symbol 'cac_weights_pitcairn' was not declared. Should it be static?
si_dpm.c:1088:26: warning: symbol 'cac_weights_oland' was not declared. Should it be static?

Both of these variables are only used in si_dpm.c.  Single file variables
should be static, so change their storage-class specifiers to static.

Signed-off-by: Tom Rix <trix@redhat.com>
---
 drivers/gpu/drm/radeon/si_dpm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/radeon/si_dpm.c b/drivers/gpu/drm/radeon/si_dpm.c
index 3add39c1a689..fbf968e3f6d7 100644
--- a/drivers/gpu/drm/radeon/si_dpm.c
+++ b/drivers/gpu/drm/radeon/si_dpm.c
@@ -329,7 +329,7 @@ static const struct si_dte_data dte_data_malta =
 	true
 };
 
-struct si_cac_config_reg cac_weights_pitcairn[] =
+static struct si_cac_config_reg cac_weights_pitcairn[] =
 {
 	{ 0x0, 0x0000ffff, 0, 0x8a, SISLANDS_CACCONFIG_CGIND },
 	{ 0x0, 0xffff0000, 16, 0x0, SISLANDS_CACCONFIG_CGIND },
@@ -1085,7 +1085,7 @@ static const struct si_dte_data dte_data_venus_pro =
 	true
 };
 
-struct si_cac_config_reg cac_weights_oland[] =
+static struct si_cac_config_reg cac_weights_oland[] =
 {
 	{ 0x0, 0x0000ffff, 0, 0x82, SISLANDS_CACCONFIG_CGIND },
 	{ 0x0, 0xffff0000, 16, 0x4F, SISLANDS_CACCONFIG_CGIND },
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] drm/radeon: change cac_weights_* to static
  2022-04-23 20:01 [PATCH] drm/radeon: change cac_weights_* to static Tom Rix
@ 2022-04-25 17:10 ` Alex Deucher
  0 siblings, 0 replies; 2+ messages in thread
From: Alex Deucher @ 2022-04-25 17:10 UTC (permalink / raw)
  To: Tom Rix
  Cc: Dave Airlie, xinhui pan, LKML, Maling list - DRI developers,
	amd-gfx list, Daniel Vetter, Deucher, Alexander,
	Christian Koenig

Applied.  Thanks!

Alex

On Sat, Apr 23, 2022 at 4:02 PM Tom Rix <trix@redhat.com> wrote:
>
> Sparse reports these issues
> si_dpm.c:332:26: warning: symbol 'cac_weights_pitcairn' was not declared. Should it be static?
> si_dpm.c:1088:26: warning: symbol 'cac_weights_oland' was not declared. Should it be static?
>
> Both of these variables are only used in si_dpm.c.  Single file variables
> should be static, so change their storage-class specifiers to static.
>
> Signed-off-by: Tom Rix <trix@redhat.com>
> ---
>  drivers/gpu/drm/radeon/si_dpm.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/si_dpm.c b/drivers/gpu/drm/radeon/si_dpm.c
> index 3add39c1a689..fbf968e3f6d7 100644
> --- a/drivers/gpu/drm/radeon/si_dpm.c
> +++ b/drivers/gpu/drm/radeon/si_dpm.c
> @@ -329,7 +329,7 @@ static const struct si_dte_data dte_data_malta =
>         true
>  };
>
> -struct si_cac_config_reg cac_weights_pitcairn[] =
> +static struct si_cac_config_reg cac_weights_pitcairn[] =
>  {
>         { 0x0, 0x0000ffff, 0, 0x8a, SISLANDS_CACCONFIG_CGIND },
>         { 0x0, 0xffff0000, 16, 0x0, SISLANDS_CACCONFIG_CGIND },
> @@ -1085,7 +1085,7 @@ static const struct si_dte_data dte_data_venus_pro =
>         true
>  };
>
> -struct si_cac_config_reg cac_weights_oland[] =
> +static struct si_cac_config_reg cac_weights_oland[] =
>  {
>         { 0x0, 0x0000ffff, 0, 0x82, SISLANDS_CACCONFIG_CGIND },
>         { 0x0, 0xffff0000, 16, 0x4F, SISLANDS_CACCONFIG_CGIND },
> --
> 2.27.0
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-04-25 17:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-23 20:01 [PATCH] drm/radeon: change cac_weights_* to static Tom Rix
2022-04-25 17:10 ` Alex Deucher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).