From: Alex Deucher <alexdeucher@gmail.com>
To: Bernard Zhao <bernard@vivo.com>
Cc: "Joshua Aberback" <joshua.aberback@amd.com>,
amd-gfx@lists.freedesktop.org, zhaojunkui2008@126.com,
"Leo Li" <sunpeng.li@amd.com>,
"Wenjing Liu" <wenjing.liu@amd.com>,
dri-devel@lists.freedesktop.org, "Pan,
Xinhui" <Xinhui.Pan@amd.com>,
"Rodrigo Siqueira" <Rodrigo.Siqueira@amd.com>,
linux-kernel@vger.kernel.org, "Samson Tam" <Samson.Tam@amd.com>,
"Nicholas Kazlauskas" <nicholas.kazlauskas@amd.com>,
"Meenakshikumar Somasundaram"
<meenakshikumar.somasundaram@amd.com>,
"David Airlie" <airlied@linux.ie>,
"Alex Hung" <alex.hung@amd.com>, "Alvin Lee" <alvin.lee2@amd.com>,
"Martin Leung" <martin.leung@amd.com>,
"Alex Deucher" <alexander.deucher@amd.com>,
"Jun Lei" <Jun.Lei@amd.com>,
"Christian König" <christian.koenig@amd.com>
Subject: Re: [PATCH] drm/amd: remove possible condition with no effect (if == else)
Date: Thu, 25 Aug 2022 12:01:04 -0400 [thread overview]
Message-ID: <CADnq5_Ond9WHx46E=zK-j1V08LC_f+29_b0mybaqxwWweigDNw@mail.gmail.com> (raw)
In-Reply-To: <20220823070047.20930-1-bernard@vivo.com>
Applied. Thanks!
Alex
On Tue, Aug 23, 2022 at 3:01 AM Bernard Zhao <bernard@vivo.com> wrote:
>
> This patch fix cocci warning:
> drivers/gpu/drm/amd/display/dc/core/dc.c:3335:2-4: WARNING:
> possible condition with no effect (if == else).
>
> Signed-off-by: Bernard Zhao <bernard@vivo.com>
> ---
> drivers/gpu/drm/amd/display/dc/core/dc.c | 9 ++-------
> 1 file changed, 2 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
> index aeecca68dea7..2d4c44083d79 100644
> --- a/drivers/gpu/drm/amd/display/dc/core/dc.c
> +++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
> @@ -3332,13 +3332,8 @@ static void commit_planes_for_stream(struct dc *dc,
> /* Since phantom pipe programming is moved to post_unlock_program_front_end,
> * move the SubVP lock to after the phantom pipes have been setup
> */
> - if (should_lock_all_pipes && dc->hwss.interdependent_update_lock) {
> - if (dc->hwss.subvp_pipe_control_lock)
> - dc->hwss.subvp_pipe_control_lock(dc, context, false, should_lock_all_pipes, NULL, subvp_prev_use);
> - } else {
> - if (dc->hwss.subvp_pipe_control_lock)
> - dc->hwss.subvp_pipe_control_lock(dc, context, false, should_lock_all_pipes, NULL, subvp_prev_use);
> - }
> + if (dc->hwss.subvp_pipe_control_lock)
> + dc->hwss.subvp_pipe_control_lock(dc, context, false, should_lock_all_pipes, NULL, subvp_prev_use);
> return;
> }
>
> --
> 2.33.1
>
next prev parent reply other threads:[~2022-08-25 16:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-23 7:00 [PATCH] drm/amd: remove possible condition with no effect (if == else) Bernard Zhao
2022-08-25 16:01 ` Alex Deucher [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-08-23 6:41 Bernard Zhao
2022-08-25 16:01 ` Alex Deucher
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='CADnq5_Ond9WHx46E=zK-j1V08LC_f+29_b0mybaqxwWweigDNw@mail.gmail.com' \
--to=alexdeucher@gmail.com \
--cc=Jun.Lei@amd.com \
--cc=Rodrigo.Siqueira@amd.com \
--cc=Samson.Tam@amd.com \
--cc=Xinhui.Pan@amd.com \
--cc=airlied@linux.ie \
--cc=alex.hung@amd.com \
--cc=alexander.deucher@amd.com \
--cc=alvin.lee2@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=bernard@vivo.com \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=joshua.aberback@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.leung@amd.com \
--cc=meenakshikumar.somasundaram@amd.com \
--cc=nicholas.kazlauskas@amd.com \
--cc=sunpeng.li@amd.com \
--cc=wenjing.liu@amd.com \
--cc=zhaojunkui2008@126.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;
as well as URLs for NNTP newsgroup(s).