From: Alex Deucher <alexdeucher@gmail.com>
To: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Cc: "Deucher, Alexander" <alexander.deucher@amd.com>,
Stephen Rothwell <sfr@canb.auug.org.au>,
Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com>,
amd-gfx list <amd-gfx@lists.freedesktop.org>
Subject: Re: [PATCH] drm/amd/display: Fix unused variable warning
Date: Wed, 20 Jan 2021 16:35:51 -0500 [thread overview]
Message-ID: <CADnq5_M0f30Gqxz9graC=js42skS2vDKfb8eOheP5GxpNm8ebg@mail.gmail.com> (raw)
In-Reply-To: <20210120172306.276209-1-Bhawanpreet.Lakha@amd.com>
On Wed, Jan 20, 2021 at 12:23 PM Bhawanpreet Lakha
<Bhawanpreet.Lakha@amd.com> 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@amd.com>
> Cc: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com>
> Cc: Stephen Rothwell <sfr@canb.auug.org.au
> Signed-off-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
> ---
> 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@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply other threads:[~2021-01-20 21:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-20 17:23 [PATCH] drm/amd/display: Fix unused variable warning Bhawanpreet Lakha
2021-01-20 21:35 ` Alex Deucher [this message]
2021-01-20 22:34 ` Harry Wentland
2021-01-25 12:48 [PATCH] drm/amd/display: fix " Arnd Bergmann
2021-01-25 15:39 ` Harry Wentland
2022-01-27 3:33 [PATCH] drm/amd/display: Fix " Tim Huang
2022-01-27 3:42 ` Alex Deucher
2022-01-27 3:45 ` Liu, Aaron
2022-01-27 3:55 ` Huang Rui
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CADnq5_M0f30Gqxz9graC=js42skS2vDKfb8eOheP5GxpNm8ebg@mail.gmail.com' \
--to=alexdeucher@gmail.com \
--cc=Bhawanpreet.Lakha@amd.com \
--cc=Nicholas.Kazlauskas@amd.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=sfr@canb.auug.org.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).