All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gpu: amd/pm: mark symbols static where possible for smu11
@ 2023-03-02  9:16 ` Jeff Pang
  0 siblings, 0 replies; 5+ messages in thread
From: Jeff Pang @ 2023-03-02  9:16 UTC (permalink / raw)
  To: evan.quan; +Cc: amd-gfx, linux-kernel, dri-devel, Jeff Pang

I get one warning when building kernel with -Werror=missing-prototypes :

drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu11/vangogh_ppt.c:1600:5:
error: no previous prototype for ‘vangogh_set_apu_thermal_limit’
[-Werror=missing-prototypes]
int vangogh_set_apu_thermal_limit(struct smu_context *smu, uint32_t limit)

In fact, this function don't need a declaration due to it's only used
in the file which they are.
So this patch marks the function with 'static'.

Signed-off-by: Jeff Pang <jeff.pang.chn@gmail.com>
---
 drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
index 016d5621e0b3..24046af60933 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
@@ -1597,7 +1597,7 @@ static int vangogh_get_apu_thermal_limit(struct smu_context *smu, uint32_t *limi
 					      0, limit);
 }
 
-int vangogh_set_apu_thermal_limit(struct smu_context *smu, uint32_t limit)
+static int vangogh_set_apu_thermal_limit(struct smu_context *smu, uint32_t limit)
 {
 	return smu_cmn_send_smc_msg_with_param(smu,
 					      SMU_MSG_SetReducedThermalLimit,
-- 
2.34.1


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

* [PATCH] gpu: amd/pm: mark symbols static where possible for smu11
@ 2023-03-02  9:16 ` Jeff Pang
  0 siblings, 0 replies; 5+ messages in thread
From: Jeff Pang @ 2023-03-02  9:16 UTC (permalink / raw)
  To: evan.quan; +Cc: Jeff Pang, dri-devel, linux-kernel, amd-gfx

I get one warning when building kernel with -Werror=missing-prototypes :

drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu11/vangogh_ppt.c:1600:5:
error: no previous prototype for ‘vangogh_set_apu_thermal_limit’
[-Werror=missing-prototypes]
int vangogh_set_apu_thermal_limit(struct smu_context *smu, uint32_t limit)

In fact, this function don't need a declaration due to it's only used
in the file which they are.
So this patch marks the function with 'static'.

Signed-off-by: Jeff Pang <jeff.pang.chn@gmail.com>
---
 drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
index 016d5621e0b3..24046af60933 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
@@ -1597,7 +1597,7 @@ static int vangogh_get_apu_thermal_limit(struct smu_context *smu, uint32_t *limi
 					      0, limit);
 }
 
-int vangogh_set_apu_thermal_limit(struct smu_context *smu, uint32_t limit)
+static int vangogh_set_apu_thermal_limit(struct smu_context *smu, uint32_t limit)
 {
 	return smu_cmn_send_smc_msg_with_param(smu,
 					      SMU_MSG_SetReducedThermalLimit,
-- 
2.34.1


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

* RE: [PATCH] gpu: amd/pm: mark symbols static where possible for smu11
  2023-03-02  9:16 ` Jeff Pang
@ 2023-03-02  9:22   ` Quan, Evan
  -1 siblings, 0 replies; 5+ messages in thread
From: Quan, Evan @ 2023-03-02  9:22 UTC (permalink / raw)
  To: Jeff Pang; +Cc: amd-gfx, linux-kernel, dri-devel

[AMD Official Use Only - General]

Thanks. But I think there was already a patch from Kun Liu to address this issue.
https://lists.freedesktop.org/archives/amd-gfx/2023-March/090029.html

BR
Evan
> -----Original Message-----
> From: Jeff Pang <jeff.pang.chn@gmail.com>
> Sent: Thursday, March 2, 2023 5:16 PM
> To: Quan, Evan <Evan.Quan@amd.com>
> Cc: amd-gfx@lists.freedesktop.org; linux-kernel@vger.kernel.org; dri-
> devel@lists.freedesktop.org; Jeff Pang <jeff.pang.chn@gmail.com>
> Subject: [PATCH] gpu: amd/pm: mark symbols static where possible for
> smu11
> 
> I get one warning when building kernel with -Werror=missing-prototypes :
> 
> drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu11/vangogh_ppt.c:1600:5:
> error: no previous prototype for ‘vangogh_set_apu_thermal_limit’
> [-Werror=missing-prototypes]
> int vangogh_set_apu_thermal_limit(struct smu_context *smu, uint32_t limit)
> 
> In fact, this function don't need a declaration due to it's only used in the file
> which they are.
> So this patch marks the function with 'static'.
> 
> Signed-off-by: Jeff Pang <jeff.pang.chn@gmail.com>
> ---
>  drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
> b/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
> index 016d5621e0b3..24046af60933 100644
> --- a/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
> +++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
> @@ -1597,7 +1597,7 @@ static int vangogh_get_apu_thermal_limit(struct
> smu_context *smu, uint32_t *limi
>  					      0, limit);
>  }
> 
> -int vangogh_set_apu_thermal_limit(struct smu_context *smu, uint32_t
> limit)
> +static int vangogh_set_apu_thermal_limit(struct smu_context *smu,
> +uint32_t limit)
>  {
>  	return smu_cmn_send_smc_msg_with_param(smu,
> 
> SMU_MSG_SetReducedThermalLimit,
> --
> 2.34.1

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

* RE: [PATCH] gpu: amd/pm: mark symbols static where possible for smu11
@ 2023-03-02  9:22   ` Quan, Evan
  0 siblings, 0 replies; 5+ messages in thread
From: Quan, Evan @ 2023-03-02  9:22 UTC (permalink / raw)
  To: Jeff Pang; +Cc: dri-devel, linux-kernel, amd-gfx

[AMD Official Use Only - General]

Thanks. But I think there was already a patch from Kun Liu to address this issue.
https://lists.freedesktop.org/archives/amd-gfx/2023-March/090029.html

BR
Evan
> -----Original Message-----
> From: Jeff Pang <jeff.pang.chn@gmail.com>
> Sent: Thursday, March 2, 2023 5:16 PM
> To: Quan, Evan <Evan.Quan@amd.com>
> Cc: amd-gfx@lists.freedesktop.org; linux-kernel@vger.kernel.org; dri-
> devel@lists.freedesktop.org; Jeff Pang <jeff.pang.chn@gmail.com>
> Subject: [PATCH] gpu: amd/pm: mark symbols static where possible for
> smu11
> 
> I get one warning when building kernel with -Werror=missing-prototypes :
> 
> drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu11/vangogh_ppt.c:1600:5:
> error: no previous prototype for ‘vangogh_set_apu_thermal_limit’
> [-Werror=missing-prototypes]
> int vangogh_set_apu_thermal_limit(struct smu_context *smu, uint32_t limit)
> 
> In fact, this function don't need a declaration due to it's only used in the file
> which they are.
> So this patch marks the function with 'static'.
> 
> Signed-off-by: Jeff Pang <jeff.pang.chn@gmail.com>
> ---
>  drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
> b/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
> index 016d5621e0b3..24046af60933 100644
> --- a/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
> +++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
> @@ -1597,7 +1597,7 @@ static int vangogh_get_apu_thermal_limit(struct
> smu_context *smu, uint32_t *limi
>  					      0, limit);
>  }
> 
> -int vangogh_set_apu_thermal_limit(struct smu_context *smu, uint32_t
> limit)
> +static int vangogh_set_apu_thermal_limit(struct smu_context *smu,
> +uint32_t limit)
>  {
>  	return smu_cmn_send_smc_msg_with_param(smu,
> 
> SMU_MSG_SetReducedThermalLimit,
> --
> 2.34.1

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

* Re: [PATCH] gpu: amd/pm: mark symbols static where possible for smu11
  2023-03-02  9:16 ` Jeff Pang
  (?)
  (?)
@ 2023-03-02 15:38 ` Jeff Pang
  -1 siblings, 0 replies; 5+ messages in thread
From: Jeff Pang @ 2023-03-02 15:38 UTC (permalink / raw)
  To: jeff.pang.chn; +Cc: linux-kernel

someone else had already submit...
https://lists.freedesktop.org/archives/amd-gfx/2023-March/090029.html
Thanks to Evan.

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

end of thread, other threads:[~2023-03-02 18:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-02  9:16 [PATCH] gpu: amd/pm: mark symbols static where possible for smu11 Jeff Pang
2023-03-02  9:16 ` Jeff Pang
2023-03-02  9:22 ` Quan, Evan
2023-03-02  9:22   ` Quan, Evan
2023-03-02 15:38 ` Jeff Pang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.