mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hamza Mahfooz <hamza.mahfooz@amd.com>
To: "Deepak R Varma" <drv@mailo.com>,
	"Harry Wentland" <harry.wentland@amd.com>,
	"Leo Li" <sunpeng.li@amd.com>,
	"Rodrigo Siqueira" <Rodrigo.Siqueira@amd.com>,
	"Alex Deucher" <alexander.deucher@amd.com>,
	"Christian König" <christian.koenig@amd.com>,
	"Pan, Xinhui" <Xinhui.Pan@amd.com>,
	"David Airlie" <airlied@gmail.com>,
	"Daniel Vetter" <daniel@ffwll.ch>,
	amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org
Cc: Praveen Kumar <kumarpraveen@linux.microsoft.com>,
	Saurabh Singh Sengar <ssengar@microsoft.com>
Subject: Re: [PATCH] drm/amd/display: Simplify same effect if/else blocks
Date: Fri, 3 Mar 2023 16:11:21 -0500	[thread overview]
Message-ID: <b106b6ea-f1c3-1d47-6851-2e580b885c58@amd.com> (raw)
In-Reply-To: <Y8POxreeC3EvOXhC@ubun2204.myguest.virtualbox.org>

On 1/15/23 05:00, Deepak R Varma wrote:
> The if / else block code has same effect irrespective of the logical
> evaluation.  Hence, simply the implementation by removing the unnecessary
> conditional evaluation. While at it, also fix the long line checkpatch
> complaint. Issue identified using cond_no_effect.cocci Coccinelle
> semantic patch script.
> 
> Signed-off-by: Deepak R Varma <drv@mailo.com>

Applied, thanks!

> ---
> Please note: The proposed change is compile tested only. If there are any
> inbuilt test cases that I should run for further verification, I will appreciate
> guidance about it. Thank you.
> 
>   drivers/gpu/drm/amd/display/dc/core/dc.c | 11 +++--------
>   1 file changed, 3 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
> index 0cb8d1f934d1..776209e5d21f 100644
> --- a/drivers/gpu/drm/amd/display/dc/core/dc.c
> +++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
> @@ -3470,14 +3470,9 @@ 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;
>   	}
>   

-- 
Hamza


      parent reply	other threads:[~2023-03-03 21:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-15 10:00 Deepak R Varma
2023-01-15 20:52 ` Joe Perches
2023-01-22 18:53   ` Deepak R Varma
2023-03-01 20:21     ` Deepak R Varma
2023-03-02 16:37       ` Harry Wentland
2023-03-03 17:50         ` Deepak R Varma
2023-03-03 20:35         ` Harry Wentland
2023-03-04 23:48           ` Joe Perches
2023-03-03 21:11 ` Hamza Mahfooz [this message]

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=b106b6ea-f1c3-1d47-6851-2e580b885c58@amd.com \
    --to=hamza.mahfooz@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=christian.koenig@amd.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=drv@mailo.com \
    --cc=harry.wentland@amd.com \
    --cc=kumarpraveen@linux.microsoft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ssengar@microsoft.com \
    --cc=sunpeng.li@amd.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

all inboxes | Powered by JetHome®