linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alex Deucher <alexdeucher@gmail.com>
To: Harry Wentland <harry.wentland@amd.com>
Cc: Pu Lehui <pulehui@huawei.com>,
	"Leo (Sunpeng) Li" <sunpeng.li@amd.com>,
	"Deucher, Alexander" <alexander.deucher@amd.com>,
	Christian Koenig <christian.koenig@amd.com>,
	xinhui pan <Xinhui.Pan@amd.com>, Dave Airlie <airlied@linux.ie>,
	Daniel Vetter <daniel@ffwll.ch>, Jun Lei <Jun.Lei@amd.com>,
	Wenjing Liu <wenjing.liu@amd.com>,
	Anson Jacob <Anson.Jacob@amd.com>,
	Qingqing Zhuo <qingqing.zhuo@amd.com>,
	Wesley Chalmers <Wesley.Chalmers@amd.com>,
	Jimmy.Kizito@amd.com, "Cyr, Aric" <aric.cyr@amd.com>,
	Martin Tsai <martin.tsai@amd.com>,
	jinlong zhang <jinlong.zhang@amd.com>,
	zhangjinhao2@huawei.com,
	Maling list - DRI developers  <dri-devel@lists.freedesktop.org>,
	amd-gfx list <amd-gfx@lists.freedesktop.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH -next] drm/amd/display: Fix gcc unused variable warning
Date: Fri, 18 Jun 2021 16:33:25 -0400	[thread overview]
Message-ID: <CADnq5_OOQqWf9yTcSwN=U8+1VbyfD-f_RfhQ+Gura_BJkspZmg@mail.gmail.com> (raw)
In-Reply-To: <fa86062f-cb45-245b-1bf0-494ffcd33908@amd.com>

Applied.  Thanks!

Alex

On Thu, Jun 17, 2021 at 2:43 PM Harry Wentland <harry.wentland@amd.com> wrote:
>
> On 2021-06-16 10:31 p.m., Pu Lehui wrote:
> > GCC reports the following warning with W=1:
> >
> > drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link_dp.c:3635:17:
> > warning:
> >  variable ‘status’ set but not used [-Wunused-but-set-variable]
> >   3635 |  enum dc_status status = DC_ERROR_UNEXPECTED;
> >        |                 ^~~~~~
> >
> > The variable should be used for error check, let's fix it.
> >
> > Signed-off-by: Pu Lehui <pulehui@huawei.com>
>
> Reviewed-by: Harry Wentland <harry.wentland@amd.com>
>
> Harry
>
> > ---
> >  drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
> > index fcb635c85330..cf29265870c8 100644
> > --- a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
> > +++ b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
> > @@ -3681,6 +3681,10 @@ bool dp_retrieve_lttpr_cap(struct dc_link *link)
> >                               DP_LT_TUNABLE_PHY_REPEATER_FIELD_DATA_STRUCTURE_REV,
> >                               lttpr_dpcd_data,
> >                               sizeof(lttpr_dpcd_data));
> > +             if (status != DC_OK) {
> > +                     dm_error("%s: Read LTTPR caps data failed.\n", __func__);
> > +                     return false;
> > +             }
> >
> >               link->dpcd_caps.lttpr_caps.revision.raw =
> >                               lttpr_dpcd_data[DP_LT_TUNABLE_PHY_REPEATER_FIELD_DATA_STRUCTURE_REV -
> >
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx

      reply	other threads:[~2021-06-18 20:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-17  2:31 [PATCH -next] drm/amd/display: Fix gcc unused variable warning Pu Lehui
2021-06-17 18:42 ` Harry Wentland
2021-06-18 20:33   ` Alex Deucher [this message]

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_OOQqWf9yTcSwN=U8+1VbyfD-f_RfhQ+Gura_BJkspZmg@mail.gmail.com' \
    --to=alexdeucher@gmail.com \
    --cc=Anson.Jacob@amd.com \
    --cc=Jimmy.Kizito@amd.com \
    --cc=Jun.Lei@amd.com \
    --cc=Wesley.Chalmers@amd.com \
    --cc=Xinhui.Pan@amd.com \
    --cc=airlied@linux.ie \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=aric.cyr@amd.com \
    --cc=christian.koenig@amd.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=harry.wentland@amd.com \
    --cc=jinlong.zhang@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.tsai@amd.com \
    --cc=pulehui@huawei.com \
    --cc=qingqing.zhuo@amd.com \
    --cc=sunpeng.li@amd.com \
    --cc=wenjing.liu@amd.com \
    --cc=zhangjinhao2@huawei.com \
    /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).