[PATCH] drm/amd/powerplay: suppress the kernel test robot warning

Alex Deucher alexdeucher at gmail.com
Fri Aug 14 04:53:42 UTC 2020


On Fri, Aug 14, 2020 at 12:22 AM Evan Quan <evan.quan at amd.com> wrote:
>
> Suppress the warning below:
>    In file included from drivers/gpu/drm/amd/amdgpu/../powerplay/smu_cmn.c:
> >> drivers/gpu/drm/amd/powerplay/smu_cmn.c:485:9: warning: Identical condition 'ret', second condition is always false [identicalConditionAfterEarlyExit]
>     return ret;
>            ^
>    drivers/gpu/drm/amd/powerplay/smu_cmn.c:477:6: note: first condition
>     if (ret)
>         ^
>    drivers/gpu/drm/amd/powerplay/smu_cmn.c:485:9: note: second condition
>     return ret;
>            ^
>
> Change-Id: I4b512008b8fe410fc7974e0483c39206ebec08ca
> Signed-off-by: Evan Quan <evan.quan at amd.com>
> Reported-by: kernel test robot <lkp at intel.com>

Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

> ---
>  drivers/gpu/drm/amd/powerplay/smu_cmn.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/powerplay/smu_cmn.c b/drivers/gpu/drm/amd/powerplay/smu_cmn.c
> index 968b734baac0..a58ea08cd115 100644
> --- a/drivers/gpu/drm/amd/powerplay/smu_cmn.c
> +++ b/drivers/gpu/drm/amd/powerplay/smu_cmn.c
> @@ -604,7 +604,7 @@ int smu_cmn_update_table(struct smu_context *smu,
>                 memcpy(table_data, table->cpu_addr, table_size);
>         }
>
> -       return ret;
> +       return 0;
>  }
>
>  int smu_cmn_write_watermarks_table(struct smu_context *smu)
> --
> 2.28.0
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


More information about the amd-gfx mailing list