[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CADnq5_OOQqWf9yTcSwN=U8+1VbyfD-f_RfhQ+Gura_BJkspZmg@mail.gmail.com>
Date: Fri, 18 Jun 2021 16:33:25 -0400
From: Alex Deucher <alexdeucher@...il.com>
To: Harry Wentland <harry.wentland@....com>
Cc: Pu Lehui <pulehui@...wei.com>,
"Leo (Sunpeng) Li" <sunpeng.li@....com>,
"Deucher, Alexander" <alexander.deucher@....com>,
Christian Koenig <christian.koenig@....com>,
xinhui pan <Xinhui.Pan@....com>,
Dave Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>, Jun Lei <Jun.Lei@....com>,
Wenjing Liu <wenjing.liu@....com>,
Anson Jacob <Anson.Jacob@....com>,
Qingqing Zhuo <qingqing.zhuo@....com>,
Wesley Chalmers <Wesley.Chalmers@....com>,
Jimmy.Kizito@....com, "Cyr, Aric" <aric.cyr@....com>,
Martin Tsai <martin.tsai@....com>,
jinlong zhang <jinlong.zhang@....com>, zhangjinhao2@...wei.com,
Maling list - DRI developers
<dri-devel@...ts.freedesktop.org>,
amd-gfx list <amd-gfx@...ts.freedesktop.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH -next] drm/amd/display: Fix gcc unused variable warning
Applied. Thanks!
Alex
On Thu, Jun 17, 2021 at 2:43 PM Harry Wentland <harry.wentland@....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@...wei.com>
>
> Reviewed-by: Harry Wentland <harry.wentland@....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@...ts.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Powered by blists - more mailing lists