diff mbox series

drm/amd/display: fix indentation in commit_planes_for_stream()

Message ID 20220831175808.100597-1-hamza.mahfooz@amd.com (mailing list archive)
State New, archived
Headers show
Series drm/amd/display: fix indentation in commit_planes_for_stream() | expand

Commit Message

Hamza Mahfooz Aug. 31, 2022, 5:58 p.m. UTC
Address the following warning:
drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc.c:3508:9: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
 3508 |         if (update_type != UPDATE_TYPE_FAST)
      |         ^~
drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc.c:3510:17: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
 3510 |                 if (update_type != UPDATE_TYPE_FAST)
      |                 ^~

Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
---
 drivers/gpu/drm/amd/display/dc/core/dc.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Alex Deucher Aug. 31, 2022, 6:03 p.m. UTC | #1
[AMD Official Use Only - General]

> -----Original Message-----
> From: Mahfooz, Hamza <Hamza.Mahfooz@amd.com>
> Sent: Wednesday, August 31, 2022 1:58 PM
> To: linux-kernel@vger.kernel.org
> Cc: Mahfooz, Hamza <Hamza.Mahfooz@amd.com>; Wentland, Harry
> <Harry.Wentland@amd.com>; Li, Sun peng (Leo) <Sunpeng.Li@amd.com>;
> Siqueira, Rodrigo <Rodrigo.Siqueira@amd.com>; Deucher, Alexander
> <Alexander.Deucher@amd.com>; Koenig, Christian
> <Christian.Koenig@amd.com>; Pan, Xinhui <Xinhui.Pan@amd.com>; David
> Airlie <airlied@linux.ie>; Daniel Vetter <daniel@ffwll.ch>; Kazlauskas,
> Nicholas <Nicholas.Kazlauskas@amd.com>; Lei, Jun <Jun.Lei@amd.com>;
> Somasundaram, Meenakshikumar
> <Meenakshikumar.Somasundaram@amd.com>; Lee, Alvin
> <Alvin.Lee2@amd.com>; Leung, Martin <Martin.Leung@amd.com>; Tam,
> Samson <Samson.Tam@amd.com>; Hung, Alex <Alex.Hung@amd.com>;
> Aberback, Joshua <Joshua.Aberback@amd.com>; Liu, Wenjing
> <Wenjing.Liu@amd.com>; amd-gfx@lists.freedesktop.org; dri-
> devel@lists.freedesktop.org
> Subject: [PATCH] drm/amd/display: fix indentation in
> commit_planes_for_stream()
> 
> Address the following warning:
> drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc.c:3508:9: warning: this
> ‘if’ clause does not guard... [-Wmisleading-indentation]
>  3508 |         if (update_type != UPDATE_TYPE_FAST)
>       |         ^~
> drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc.c:3510:17: note: ...this
> statement, but the latter is misleadingly indented as if it were guarded by the
> ‘if’
>  3510 |                 if (update_type != UPDATE_TYPE_FAST)
>       |                 ^~
> 
> Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com>

Acked-by: Alex Deucher <alexander.deucher@amd.com>

> ---
>  drivers/gpu/drm/amd/display/dc/core/dc.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c
> b/drivers/gpu/drm/amd/display/dc/core/dc.c
> index b49237390cce..6c4948916e7e 100644
> --- a/drivers/gpu/drm/amd/display/dc/core/dc.c
> +++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
> @@ -3505,11 +3505,11 @@ static void commit_planes_for_stream(struct dc
> *dc,
>  					top_pipe_to_program-
> >stream_res.tg);
>  		}
> 
> -	if (update_type != UPDATE_TYPE_FAST)
> +	if (update_type != UPDATE_TYPE_FAST) {
>  		dc->hwss.post_unlock_program_front_end(dc, context);
> -		if (update_type != UPDATE_TYPE_FAST)
> -			if (dc->hwss.commit_subvp_config)
> -				dc->hwss.commit_subvp_config(dc,
> context);
> +		if (dc->hwss.commit_subvp_config)
> +			dc->hwss.commit_subvp_config(dc, context);
> +	}
> 
>  	/* Since phantom pipe programming is moved to
> post_unlock_program_front_end,
>  	 * move the SubVP lock to after the phantom pipes have been setup
> --
> 2.37.2
diff mbox series

Patch

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
index b49237390cce..6c4948916e7e 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
@@ -3505,11 +3505,11 @@  static void commit_planes_for_stream(struct dc *dc,
 					top_pipe_to_program->stream_res.tg);
 		}
 
-	if (update_type != UPDATE_TYPE_FAST)
+	if (update_type != UPDATE_TYPE_FAST) {
 		dc->hwss.post_unlock_program_front_end(dc, context);
-		if (update_type != UPDATE_TYPE_FAST)
-			if (dc->hwss.commit_subvp_config)
-				dc->hwss.commit_subvp_config(dc, context);
+		if (dc->hwss.commit_subvp_config)
+			dc->hwss.commit_subvp_config(dc, context);
+	}
 
 	/* Since phantom pipe programming is moved to post_unlock_program_front_end,
 	 * move the SubVP lock to after the phantom pipes have been setup