[PATCH 02/34] drm/amd/pm/swsmu/smu13/aldebaran_ppt: Remove unused variable 'ret'

Alex Deucher alexdeucher at gmail.com
Thu May 27 03:49:25 UTC 2021


This should be checked.  Will send out a patch momentarily.

Thanks,

Alex

On Wed, May 26, 2021 at 4:47 AM Lee Jones <lee.jones at linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/aldebaran_ppt.c: In function ‘aldebaran_is_dpm_running’:
>  drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/aldebaran_ppt.c:1260:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
>
> Cc: Alex Deucher <alexander.deucher at amd.com>
> Cc: "Christian König" <christian.koenig at amd.com>
> Cc: David Airlie <airlied at linux.ie>
> Cc: Daniel Vetter <daniel at ffwll.ch>
> Cc: amd-gfx at lists.freedesktop.org
> Cc: dri-devel at lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones at linaro.org>
> ---
>  drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
> index d6ce665baaf3b..d077e211017a9 100644
> --- a/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
> +++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
> @@ -1368,10 +1368,9 @@ static int aldebaran_usr_edit_dpm_table(struct smu_context *smu, enum PP_OD_DPM_
>
>  static bool aldebaran_is_dpm_running(struct smu_context *smu)
>  {
> -       int ret = 0;
>         uint32_t feature_mask[2];
>         unsigned long feature_enabled;
> -       ret = smu_cmn_get_enabled_mask(smu, feature_mask, 2);
> +       smu_cmn_get_enabled_mask(smu, feature_mask, 2);
>         feature_enabled = (unsigned long)((uint64_t)feature_mask[0] |
>                                           ((uint64_t)feature_mask[1] << 32));
>         return !!(feature_enabled & SMC_DPM_FEATURE);
> --
> 2.31.1
>


More information about the amd-gfx mailing list