Re: [PATCH 30/37] drm/amd/display/dc/link/protocols/link_dp_training: Remove set but unused variable 'result'

Alex Deucher
2023-03-17T20:39:32Z

Applied. Thanks!

On Fri, Mar 17, 2023 at 4:23 AM Lee Jones <lee@kernel.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
> drivers/gpu/drm/amd/amdgpu/../display/dc/link/protocols/link_dp_training.c: In function ‘perform_link_training_with_retries’:
> drivers/gpu/drm/amd/amdgpu/../display/dc/link/protocols/link_dp_training.c:1586:38: warning: variable ‘result’ set but not used [-Wunused-but-set-variable]
>
> Cc: Harry Wentland <harry.wentland@amd.com>
> Cc: Leo Li <sunpeng.li@amd.com>
> Cc: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: "Pan, Xinhui" <Xinhui.Pan@amd.com>
> Cc: David Airlie <airlied@gmail.com>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: Wenjing Liu <wenjing.liu@amd.com>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee@kernel.org>
> ---
> .../gpu/drm/amd/display/dc/link/protocols/link_dp_training.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training.c b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training.c
> index a9025671ee4a8..10261764a0cea 100644
> --- a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training.c
> +++ b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training.c
> @@ -1580,8 +1580,7 @@ bool perform_link_training_with_retries(
> * Report and continue with eDP panel mode to
> * perform eDP link training with right settings
> */
> - bool result;
> - result = cp_psp->funcs.enable_assr(cp_psp->handle, link);
> + cp_psp->funcs.enable_assr(cp_psp->handle, link);
> }
> }
>
> --
> 2.40.0.rc1.284.g88254d51c5-goog
>