From: "Christian König" <christian.koenig@amd.com>
To: "Rodrigo Siqueira Jordao" <Rodrigo.Siqueira@amd.com>,
"Túlio Fernandes" <tuliomf09@gmail.com>
Cc: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
harry.wentland@amd.com, sunpeng.li@amd.com,
alexander.deucher@amd.com, Xinhui.Pan@amd.com, airlied@gmail.com,
daniel@ffwll.ch
Subject: Re: [PATCH] drm/amd/display: clean unnecessary braces
Date: Thu, 22 Feb 2024 10:32:57 +0100 [thread overview]
Message-ID: <91f787db-9a11-4f6d-8bcb-d0e4b05604db@amd.com> (raw)
In-Reply-To: <9b3fc6a9-a24f-4270-ac66-696fde238947@amd.com>
Am 21.02.24 um 19:01 schrieb Rodrigo Siqueira Jordao:
> [SNIP]
>> diff --git
>> a/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource_helpers.c
>> b/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource_helpers.c
>> index 87760600e154..e179dea148e7 100644
>> --- a/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource_helpers.c
>> +++ b/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource_helpers.c
>> @@ -110,14 +110,12 @@ uint32_t
>> dcn32_helper_calculate_num_ways_for_subvp(
>> struct dc_state *context)
>> {
>> if (context->bw_ctx.bw.dcn.mall_subvp_size_bytes > 0) {
>> - if (dc->debug.force_subvp_num_ways) {
>> + if (dc->debug.force_subvp_num_ways)
>> return dc->debug.force_subvp_num_ways;
>> - } else {
>> + else
>> return dcn32_helper_mall_bytes_to_ways(dc,
>> context->bw_ctx.bw.dcn.mall_subvp_size_bytes);
>> - }
>> - } else {
>> + } else
>
> Actually, we want to keep the braces around the else part to keep the
> braces balanced with the if condition.
Yeah, and checkpatch actually complains about that. E.g. you shouldn't
use "} else" or "else {", but always "} else {".
So the patch is actually a bit bogus and introduces new coding style
warnings.
Regards,
Christian.
>
> Thanks
> Siqueira
>
>> return 0;
>> - }
>> }
>> void dcn32_merge_pipes_for_subvp(struct dc *dc,
>> @@ -250,9 +248,9 @@ bool dcn32_is_psr_capable(struct pipe_ctx *pipe)
>> {
>> bool psr_capable = false;
>> - if (pipe->stream &&
>> pipe->stream->link->psr_settings.psr_version !=
>> DC_PSR_VERSION_UNSUPPORTED) {
>> + if (pipe->stream && pipe->stream->link->psr_settings.psr_version
>> != DC_PSR_VERSION_UNSUPPORTED)
>> psr_capable = true;
>> - }
>> +
>> return psr_capable;
>> }
>> @@ -278,9 +276,9 @@ static void override_det_for_subvp(struct dc
>> *dc, struct dc_state *context, uint
>> if (pipe_ctx->stream && pipe_ctx->plane_state &&
>> dc_state_get_pipe_subvp_type(context, pipe_ctx) != SUBVP_PHANTOM) {
>> if (dcn32_allow_subvp_high_refresh_rate(dc, context,
>> pipe_ctx)) {
>> - if (pipe_ctx->stream->timing.v_addressable == 1080
>> && pipe_ctx->stream->timing.h_addressable == 1920) {
>> + if (pipe_ctx->stream->timing.v_addressable == 1080
>> && pipe_ctx->stream->timing.h_addressable == 1920)
>> fhd_count++;
>> - }
>> +
>> subvp_high_refresh_count++;
>> }
>> }
>
next prev parent reply other threads:[~2024-02-22 9:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-17 20:20 [PATCH] drm/amd/display: clean unnecessary braces Túlio Fernandes
2024-02-21 18:01 ` Rodrigo Siqueira Jordao
2024-02-22 9:32 ` Christian König [this message]
2024-02-23 19:20 ` Tulio Moreira Fernandes
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=91f787db-9a11-4f6d-8bcb-d0e4b05604db@amd.com \
--to=christian.koenig@amd.com \
--cc=Rodrigo.Siqueira@amd.com \
--cc=Xinhui.Pan@amd.com \
--cc=airlied@gmail.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=harry.wentland@amd.com \
--cc=sunpeng.li@amd.com \
--cc=tuliomf09@gmail.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