[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CADnq5_NpjoaU5+HThA5s5-KANfoYSgwr2Vj6pYuqWKqJrdXRkg@mail.gmail.com>
Date: Tue, 31 Jan 2023 12:20:31 -0500
From: Alex Deucher <alexdeucher@...il.com>
To: Tom Rix <trix@...hat.com>
Cc: harry.wentland@....com, sunpeng.li@....com,
Rodrigo.Siqueira@....com, alexander.deucher@....com,
christian.koenig@....com, Xinhui.Pan@....com, airlied@...il.com,
daniel@...ll.ch, Anthony.Koo@....com, alex.hung@....com,
aurabindo.pillai@....com, Roman.Li@....com, wenjing.liu@....com,
Dillon.Varone@....com, mwen@...lia.com, dingchen.zhang@....com,
martin.tsai@....com, aric.cyr@....com, Wesley.Chalmers@....com,
Max.Tseng@....com, sivapiriyan.kumarasamy@....com,
Tony.Cheng@....com, dri-devel@...ts.freedesktop.org,
amd-gfx@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drm/amd/display: reduce else-if to else in dcn10_blank_pixel_data()
Applied. Thanks!
On Thu, Jan 26, 2023 at 8:38 PM Tom Rix <trix@...hat.com> wrote:
>
> checkpatch reports
> drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c:2902:13: style:
> Expression is always true because 'else if' condition is opposite to previous condition at line 2895. [multiCondition]
> } else if (blank) {
> ^
> drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c:2895:6: note: first condition
> if (!blank) {
> ^
> drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c:2902:13: note: else if condition is opposite to first condition
> } else if (blank) {
>
> It is not necessary to explicitly the check != condition, an else is simplier.
>
> Fixes: aa5a57773042 ("drm/amd/display: Vari-bright looks disabled near end of MM14")
> Signed-off-by: Tom Rix <trix@...hat.com>
> ---
> drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
> index bb155734ac93..f735ae5e045f 100644
> --- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
> +++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
> @@ -2899,7 +2899,7 @@ void dcn10_blank_pixel_data(
> dc->hwss.set_pipe(pipe_ctx);
> stream_res->abm->funcs->set_abm_level(stream_res->abm, stream->abm_level);
> }
> - } else if (blank) {
> + } else {
> dc->hwss.set_abm_immediate_disable(pipe_ctx);
> if (stream_res->tg->funcs->set_blank) {
> stream_res->tg->funcs->wait_for_state(stream_res->tg, CRTC_STATE_VBLANK);
> --
> 2.26.3
>
Powered by blists - more mailing lists