Re: [PATCH] drm/amd/display: Fix unused variable warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jan 20, 2021 at 12:23 PM Bhawanpreet Lakha
<Bhawanpreet.Lakha@xxxxxxx> wrote:
>
> [Why]
> The dm struct is only being used if DCN config is defined and this
> causes a unused variable warning if DCN option is not set.
>
> [How]
> Remove the compile flag so the variable is used (there also seems to be
> a duplicate guard due to a bad rebase) so remove the outer guard to fix
> the warning.
>
> Fixes this warning
> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c: In function 'dm_set_vblank':
> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c:5380:33: warning: unused variable 'dm' [-Wunused-variable]
>
> Fixes: e177af8a43da ("drm/amd/display: Fix deadlock during gpu reset v3")
> Cc: Alex Deucher <alexander.deucher@xxxxxxx>
> Cc: Nicholas Kazlauskas <Nicholas.Kazlauskas@xxxxxxx>
> Cc: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx
> Signed-off-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@xxxxxxx>

Acked-by: Alex Deucher <alexander.deucher@xxxxxxx>

> ---
>  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> index 83ec92a69cba..7c188c8eaeb1 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -5472,7 +5472,6 @@ static inline int dm_set_vblank(struct drm_crtc *crtc, bool enable)
>         if (!dc_interrupt_set(adev->dm.dc, irq_source, enable))
>                 return -EBUSY;
>
> -#if defined(CONFIG_DRM_AMD_DC_DCN)
>         if (amdgpu_in_reset(adev))
>                 return 0;
>
> @@ -5492,7 +5491,6 @@ static inline int dm_set_vblank(struct drm_crtc *crtc, bool enable)
>
>         mutex_unlock(&dm->dc_lock);
>
> -#endif
>         return 0;
>  }
>
> --
> 2.25.1
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux