[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CADnq5_MpPB-V2ZUr7AQDyczuSyJ4=sMCnRSdqEFG9sfBdn1eLQ@mail.gmail.com>
Date: Mon, 27 Mar 2023 19:48:06 -0400
From: Alex Deucher <alexdeucher@...il.com>
To: Caio Novais <caionovais@....br>
Cc: amd-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org, Felipe Clark <felipe.clark@....com>,
Wenjing Liu <wenjing.liu@....com>,
Maíra Canal <mairacanal@...eup.net>,
Mario Limonciello <mario.limonciello@....com>,
Jun Lei <Jun.Lei@....com>, Charlene Liu <Charlene.Liu@....com>,
Gabe Teeger <gabe.teeger@....com>,
Rodrigo Siqueira <Rodrigo.Siqueira@....com>,
Taimur Hassan <Syed.Hassan@....com>,
Aurabindo Pillai <aurabindo.pillai@....com>,
Alvin Lee <alvin.lee2@....com>,
George Shen <George.Shen@....com>,
Hamza Mahfooz <hamza.mahfooz@....com>,
Chaitanya Dhere <chaitanya.dhere@....com>,
Alan Liu <HaoPing.Liu@....com>,
Mukul Joshi <mukul.joshi@....com>,
André Almeida <andrealmeid@...lia.com>,
Jingwen Zhu <Jingwen.Zhu@....com>,
Guo Zhengkui <guozhengkui@...o.com>,
Leo Li <sunpeng.li@....com>, Melissa Wen <mwen@...lia.com>,
Le Ma <le.ma@....com>,
Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>,
Martin Leung <Martin.Leung@....com>,
Ryan Lin <tsung-hua.lin@....com>,
Brian Chang <Brian.Chang@....com>,
Sung Joon Kim <sungjoon.kim@....com>,
Yifan Zhang <yifan1.zhang@....com>,
Jack Xiao <Jack.Xiao@....com>,
Dillon Varone <Dillon.Varone@....com>,
Tom Chung <chiahsuan.chung@....com>,
Wesley Chalmers <Wesley.Chalmers@....com>,
Qingqing Zhuo <qingqing.zhuo@....com>,
"Pan, Xinhui" <Xinhui.Pan@....com>, Zhan Liu <zhan.liu@....com>,
Roman Li <Roman.Li@....com>,
Christian König <christian.koenig@....com>,
Wayne Lin <wayne.lin@....com>,
Alex Deucher <alexander.deucher@....com>,
Ethan Wellenreiter <Ethan.Wellenreiter@....com>,
Nicholas Kazlauskas <Nicholas.Kazlauskas@....com>,
Joshua Ashton <joshua@...ggi.es>,
Hawking Zhang <Hawking.Zhang@....com>
Subject: Re: [PATCH 02/12] drm/amd: Remove unused variable 'value0'
On Mon, Mar 27, 2023 at 7:34 PM Caio Novais <caionovais@....br> wrote:
>
> Compiling AMD GPU drivers displays a warning:
>
> drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_link_encoder.c: In function ‘dcn10_link_encoder_update_mst_stream_allocation_table’:
> drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_link_encoder.c:1222:18: warning: variable ‘value0’ set but not used [-Wunused-but-set-variable]
>
> Get rid of it by removing the variable.
>
> Signed-off-by: Caio Novais <caionovais@....br>
> ---
> drivers/gpu/drm/amd/display/dc/dcn10/dcn10_link_encoder.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_link_encoder.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_link_encoder.c
> index c4287147b853..81aa1631945a 100644
> --- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_link_encoder.c
> +++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_link_encoder.c
> @@ -1219,7 +1219,6 @@ void dcn10_link_encoder_update_mst_stream_allocation_table(
> const struct link_mst_stream_allocation_table *table)
> {
> struct dcn10_link_encoder *enc10 = TO_DCN10_LINK_ENC(enc);
> - uint32_t value0 = 0;
> uint32_t value1 = 0;
> uint32_t value2 = 0;
> uint32_t slots = 0;
> @@ -1321,8 +1320,6 @@ void dcn10_link_encoder_update_mst_stream_allocation_table(
> do {
> udelay(10);
>
> - value0 = REG_READ(DP_MSE_SAT_UPDATE);
This reads a register. Removing it may adversely affect the
programming sequence. If you want to avoid the set but unused
warning, just drop the assignment, but leave the REG_READ.
Alex
> -
> REG_GET(DP_MSE_SAT_UPDATE,
> DP_MSE_SAT_UPDATE, &value1);
>
> --
> 2.40.0
>
Powered by blists - more mailing lists