[35/40] drm/amd/pm/swsmu/smu11/vangogh_ppt: Make local function 'vangogh_set_default_dpm_tables()' static
diff mbox series

Message ID 20201124193824.1118741-36-lee.jones@linaro.org
State New, archived
Headers show
Series
  • Rid W=1 warnings from GPU
Related show

Commit Message

Lee Jones Nov. 24, 2020, 7:38 p.m. UTC
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu11/vangogh_ppt.c: At top level:
 drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu11/vangogh_ppt.c:764:5: warning: no previous prototype for ‘vangogh_set_default_dpm_tables’ [-Wmissing-prototypes]
 764 | int vangogh_set_default_dpm_tables(struct smu_context *smu)
 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Xiaojian Du <Xiaojian.Du@amd.com>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

Comments

Alex Deucher Nov. 30, 2020, 10:58 p.m. UTC | #1
On Tue, Nov 24, 2020 at 2:45 PM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu11/vangogh_ppt.c: At top level:
>  drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu11/vangogh_ppt.c:764:5: warning: no previous prototype for ‘vangogh_set_default_dpm_tables’ [-Wmissing-prototypes]
>  764 | int vangogh_set_default_dpm_tables(struct smu_context *smu)
>  | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: Xiaojian Du <Xiaojian.Du@amd.com>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

This code has changed a bit and I've just sent out a patch to handle
this slightly differently.  Thanks!

Alex


> ---
>  drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c | 9 +++------
>  1 file changed, 3 insertions(+), 6 deletions(-)
>
> 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 9a2f72f21ed86..05c32be3a7496 100644
> --- a/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
> +++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
> @@ -400,16 +400,13 @@ static int vangogh_get_current_activity_percent(struct smu_context *smu,
>                                                enum amd_pp_sensors sensor,
>                                                uint32_t *value)
>  {
> -       int ret = 0;
> -
>         if (!value)
>                 return -EINVAL;
>
>         switch (sensor) {
>         case AMDGPU_PP_SENSOR_GPU_LOAD:
> -               ret = vangogh_get_smu_metrics_data(smu,
> -                                                 METRICS_AVERAGE_GFXACTIVITY,
> -                                                 value);
> +               vangogh_get_smu_metrics_data(smu, METRICS_AVERAGE_GFXACTIVITY,
> +                                            value);
>                 break;
>         default:
>                 dev_err(smu->adev->dev, "Invalid sensor for retrieving clock activity\n");
> @@ -761,7 +758,7 @@ static int vangogh_od_edit_dpm_table(struct smu_context *smu, enum PP_OD_DPM_TAB
>         return ret;
>  }
>
> -int vangogh_set_default_dpm_tables(struct smu_context *smu)
> +static int vangogh_set_default_dpm_tables(struct smu_context *smu)
>  {
>         struct smu_table_context *smu_table = &smu->smu_table;
>
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

Patch
diff mbox series

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 9a2f72f21ed86..05c32be3a7496 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
@@ -400,16 +400,13 @@  static int vangogh_get_current_activity_percent(struct smu_context *smu,
 					       enum amd_pp_sensors sensor,
 					       uint32_t *value)
 {
-	int ret = 0;
-
 	if (!value)
 		return -EINVAL;
 
 	switch (sensor) {
 	case AMDGPU_PP_SENSOR_GPU_LOAD:
-		ret = vangogh_get_smu_metrics_data(smu,
-						  METRICS_AVERAGE_GFXACTIVITY,
-						  value);
+		vangogh_get_smu_metrics_data(smu, METRICS_AVERAGE_GFXACTIVITY,
+					     value);
 		break;
 	default:
 		dev_err(smu->adev->dev, "Invalid sensor for retrieving clock activity\n");
@@ -761,7 +758,7 @@  static int vangogh_od_edit_dpm_table(struct smu_context *smu, enum PP_OD_DPM_TAB
 	return ret;
 }
 
-int vangogh_set_default_dpm_tables(struct smu_context *smu)
+static int vangogh_set_default_dpm_tables(struct smu_context *smu)
 {
 	struct smu_table_context *smu_table = &smu->smu_table;