[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CADnq5_OhYPi3DVVuZmHM-ghiatEyjzpMviQEJdX_uQFgQY9yUg@mail.gmail.com>
Date: Mon, 27 Mar 2023 19:50:42 -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 09/12] drm/amd/display: Remove two unused variables
'is_pipe_split_expected' and 'state'
On Mon, Mar 27, 2023 at 7:35 PM Caio Novais <caionovais@....br> wrote:
>
> Compiling AMD GPU drivers displays two warnings:
>
> drivers/gpu/drm/amd/amdgpu/../display/dc/dcn32/dcn32_resource.c: In function ‘dcn32_acquire_post_bldn_3dlut’:
> drivers/gpu/drm/amd/amdgpu/../display/dc/dcn32/dcn32_resource.c:1614:31: warning: variable ‘state’ set but not used [-Wunused-but-set-variable]
> and
> drivers/gpu/drm/amd/amdgpu/../display/dc/dcn32/dcn32_resource.c: In function ‘dcn32_populate_dml_pipes_from_context’:
> drivers/gpu/drm/amd/amdgpu/../display/dc/dcn32/dcn32_resource.c:1916:17: warning: variable ‘is_pipe_split_expected’ set but not used [-Wunused-but-set-variable]
>
> Get rid of them by removing the variables.
>
> Signed-off-by: Caio Novais <caionovais@....br>
> ---
> drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.c b/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.c
> index 74e50c09bb62..3435d3294e0b 100644
> --- a/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.c
> +++ b/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.c
> @@ -1611,7 +1611,6 @@ bool dcn32_acquire_post_bldn_3dlut(
> struct dc_transfer_func **shaper)
> {
> bool ret = false;
> - union dc_3dlut_state *state;
>
> ASSERT(*lut == NULL && *shaper == NULL);
> *lut = NULL;
> @@ -1620,7 +1619,6 @@ bool dcn32_acquire_post_bldn_3dlut(
> if (!res_ctx->is_mpc_3dlut_acquired[mpcc_id]) {
> *lut = pool->mpc_lut[mpcc_id];
> *shaper = pool->mpc_shaper[mpcc_id];
> - state = &pool->mpc_lut[mpcc_id]->state;
> res_ctx->is_mpc_3dlut_acquired[mpcc_id] = true;
> ret = true;
> }
> @@ -1913,7 +1911,6 @@ int dcn32_populate_dml_pipes_from_context(
> struct resource_context *res_ctx = &context->res_ctx;
> struct pipe_ctx *pipe;
> bool subvp_in_use = false;
> - uint8_t is_pipe_split_expected[MAX_PIPES] = {0};
> struct dc_crtc_timing *timing;
>
> dcn20_populate_dml_pipes_from_context(dc, context, pipes, fast_validate);
> @@ -2002,7 +1999,6 @@ int dcn32_populate_dml_pipes_from_context(
> }
>
> DC_FP_START();
> - is_pipe_split_expected[i] = dcn32_predict_pipe_split(context, &pipes[pipe_cnt]);
> DC_FP_END();
You can drop the DC_FP macros as well if you drop the function call.
Alex
>
> pipe_cnt++;
> --
> 2.40.0
>
Powered by blists - more mailing lists