From 4191fa9046b85f31e6803aa4e31758414010cf7c Mon Sep 17 00:00:00 2001 From: "Mario Limonciello (AMD)" Date: Fri, 24 Oct 2025 10:03:41 -0500 Subject: [PATCH] drm/amd/display: Improve readability of link_detect_sink_signal_type [WHAT] Move the break statements indentation in for the switch/case block. Reviewed-by: Alex Hung Signed-off-by: Mario Limonciello (AMD) Signed-off-by: Alex Hung Signed-off-by: Alex Deucher --- .../gpu/drm/amd/display/dc/link/link_detection.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/link/link_detection.c b/drivers/gpu/drm/amd/display/dc/link/link_detection.c index 9746bb2f6c3b..7084b1909445 100644 --- a/drivers/gpu/drm/amd/display/dc/link/link_detection.c +++ b/drivers/gpu/drm/amd/display/dc/link/link_detection.c @@ -171,6 +171,7 @@ static enum signal_type link_detect_sink_signal_type(struct dc_link *link, enum dc_detect_reason reason) { enum signal_type result; + struct audio_support *aud_support; struct graphics_object_id enc_id; if (link->is_dig_mapping_flexible) @@ -201,20 +202,18 @@ static enum signal_type link_detect_sink_signal_type(struct dc_link *link, } switch (link->link_id.id) { - case CONNECTOR_ID_HDMI_TYPE_A: { + case CONNECTOR_ID_HDMI_TYPE_A: /* check audio support: * if native HDMI is not supported, switch to DVI */ - struct audio_support *aud_support = - &link->dc->res_pool->audio_support; + aud_support = &link->dc->res_pool->audio_support; if (!aud_support->hdmi_audio_native) if (link->link_id.id == CONNECTOR_ID_HDMI_TYPE_A) result = SIGNAL_TYPE_DVI_SINGLE_LINK; - } - break; + break; case CONNECTOR_ID_DISPLAY_PORT: - case CONNECTOR_ID_USBC: { + case CONNECTOR_ID_USBC: /* DP HPD short pulse. Passive DP dongle will not * have short pulse */ @@ -226,10 +225,9 @@ static enum signal_type link_detect_sink_signal_type(struct dc_link *link, if (!dm_helpers_is_dp_sink_present(link)) result = SIGNAL_TYPE_DVI_SINGLE_LINK; } - } - break; + break; default: - break; + break; } return result; -- 2.47.3