[PATCH] drm/amdgpu/display: fix indentation in defer_delay_converter_wa()

Quan, Evan Evan.Quan at amd.com
Wed Oct 28 01:57:24 UTC 2020


[AMD Official Use Only - Internal Distribution Only]

Reviewed-by: Evan Quan <evan.quan at amd.com>

-----Original Message-----
From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> On Behalf Of Alex Deucher
Sent: Tuesday, October 27, 2020 1:51 AM
To: amd-gfx at lists.freedesktop.org
Cc: Deucher, Alexander <Alexander.Deucher at amd.com>
Subject: [PATCH] drm/amdgpu/display: fix indentation in defer_delay_converter_wa()

Fixes this warning:
drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link_ddc.c: In function ‘defer_delay_converter_wa’:
drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link_ddc.c:285:2: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
  285 |  if (link->dpcd_caps.branch_dev_id == DP_BRANCH_DEVICE_ID_0080E1 &&
      |  ^~
drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link_ddc.c:291:3: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
  291 |   if (link->dpcd_caps.branch_dev_id == DP_BRANCH_DEVICE_ID_006037 &&
      |   ^~

Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
---
 drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c b/drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c
index ef0f50db4907..54beda4d4e85 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c
@@ -283,15 +283,15 @@ static uint32_t defer_delay_converter_wa(
 struct dc_link *link = ddc->link;

 if (link->dpcd_caps.branch_dev_id == DP_BRANCH_DEVICE_ID_0080E1 &&
-!memcmp(link->dpcd_caps.branch_dev_name,
-DP_DVI_CONVERTER_ID_4,
-sizeof(link->dpcd_caps.branch_dev_name)))
+    !memcmp(link->dpcd_caps.branch_dev_name,
+    DP_DVI_CONVERTER_ID_4,
+    sizeof(link->dpcd_caps.branch_dev_name)))
 return defer_delay > I2C_OVER_AUX_DEFER_WA_DELAY ?
 defer_delay : I2C_OVER_AUX_DEFER_WA_DELAY;
-if (link->dpcd_caps.branch_dev_id == DP_BRANCH_DEVICE_ID_006037 &&
-!memcmp(link->dpcd_caps.branch_dev_name,
-DP_DVI_CONVERTER_ID_5,
-sizeof(link->dpcd_caps.branch_dev_name)))
+if (link->dpcd_caps.branch_dev_id == DP_BRANCH_DEVICE_ID_006037 &&
+    !memcmp(link->dpcd_caps.branch_dev_name,
+    DP_DVI_CONVERTER_ID_5,
+    sizeof(link->dpcd_caps.branch_dev_name)))
 return defer_delay > I2C_OVER_AUX_DEFER_WA_DELAY_1MS ?
 I2C_OVER_AUX_DEFER_WA_DELAY_1MS : defer_delay;

--
2.25.4

_______________________________________________
amd-gfx mailing list
amd-gfx at lists.freedesktop.org
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=04%7C01%7Cevan.quan%40amd.com%7C4add589b1d8e4da5ca1508d879d7b126%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637393314640831230%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=IFfWUfCrpUalNb28hRkXU5M7zOMlrTuussAwIItuHKA%3D&reserved=0


More information about the amd-gfx mailing list