]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amd/display: Improve readability of link_detect_sink_signal_type
authorMario Limonciello (AMD) <superm1@kernel.org>
Fri, 24 Oct 2025 15:03:41 +0000 (10:03 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 8 Dec 2025 18:56:36 +0000 (13:56 -0500)
[WHAT]
Move the break statements indentation in for the switch/case block.

Reviewed-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
Signed-off-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/link/link_detection.c

index 9746bb2f6c3b7c0e154e84bff896f2b54bb6c23f..7084b1909445269fac063481336b10f425d95893 100644 (file)
@@ -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;