Skip to contentSkip to conversation

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

PATCH In review Hamza Mahfooz 3 participants 3 messages Sep 1, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 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)
      |                 ^~

---
v2: implement feedback from Alvin

---
 drivers/gpu/drm/amd/display/dc/core/dc.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +4 -3
index b49237390cce..9860bf38c547 100644
@@ -3507,9 +3507,10 @@ static void commit_planes_for_stream(struct dc *dc,
 
 	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 (update_type != UPDATE_TYPE_FAST)
+		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
Signature · 1 line
2.37.2
maintainer Acked-by on v2 1/1
#1 lore raw

[Public]

________________________________
From: Mahfooz, Hamza <[email protected]>
Sent: Thursday, September 1, 2022 10:15 AM
To: [email protected] <[email protected]>
Cc: Mahfooz, Hamza <[email protected]>; Wentland, Harry <[email protected]>; Li, Sun peng (Leo) <[email protected]>; Siqueira, Rodrigo <[email protected]>; Deucher, Alexander <[email protected]>; Koenig, Christian <[email protected]>; Pan, Xinhui <[email protected]>; David Airlie <[email protected]>; Daniel Vetter <[email protected]>; Kazlauskas, Nicholas <[email protected]>; Lei, Jun <[email protected]>; Somasundaram, Meenakshikumar <[email protected]>; Lee, Alvin <[email protected]>; Leung, Martin <[email protected]>; Tam, Samson <[email protected]>; Hung, Alex <[email protected]>; Liu, Wenjing <[email protected]>; Aberback, Joshua <[email protected]>; [email protected] <[email protected]>; [email protected] <[email protected]>
Subject: [PATCH v2] 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)
      |                 ^~

---
v2: implement feedback from Alvin

---
 drivers/gpu/drm/amd/display/dc/core/dc.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +4 -3
index b49237390cce..9860bf38c547 100644
@@ -3507,9 +3507,10 @@ static void commit_planes_for_stream(struct dc *dc,
 
         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 (update_type != UPDATE_TYPE_FAST)
+               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

Reviewed-by on v2 1/1
#2 lore raw
In reply to Hamza Mahfooz
Quoted 23 lines · Hamza Mahfooz

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)
       |                 ^~

---
v2: implement feedback from Alvin

---
  drivers/gpu/drm/amd/display/dc/core/dc.c | 7 ++++---
  1 file changed, 4 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +0 -0
index b49237390cce..9860bf38c547 100644
@@ -3507,9 +3507,10 @@ static void commit_planes_for_stream(struct dc *dc,
 
  	if (update_type != UPDATE_TYPE_FAST)
  		dc->hwss.post_unlock_program_front_end(dc, context);

drivers/gpu/drm/amd/display/dc/core/dc.c static void commit_planes_for_stream(struct dc *dc, · line 3516

Quoted 10 lines
drivers/gpu/drm/amd/display/dc/core/dc.c +4 -3
-		if (update_type != UPDATE_TYPE_FAST)
-			if (dc->hwss.commit_subvp_config)
-				dc->hwss.commit_subvp_config(dc, context);
+
+	if (update_type != UPDATE_TYPE_FAST)
+		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

and applied to amd-staging-drm-next.

Thanks
Siqueira