drm/amd/display: Remove the unused variable pre_connection_type
authorJiapeng Chong <jiapeng.chong@linux.alibaba.com>
Fri, 10 Feb 2023 02:43:43 +0000 (10:43 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 14 Feb 2023 21:04:42 +0000 (16:04 -0500)
Variable pre_connection_type is not effectively used, so delete it.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4031
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/link/link_detection.c

index 001a4ac9bfcf1d4644679f476cfb2e3958c5aaf7..29cdb61d66c835303692c18c3a82517610bc38ce 100644 (file)
@@ -859,7 +859,6 @@ static bool detect_link_and_local_sink(struct dc_link *link,
        struct dc_sink *prev_sink = NULL;
        struct dpcd_caps prev_dpcd_caps;
        enum dc_connection_type new_connection_type = dc_connection_none;
-       enum dc_connection_type pre_connection_type = dc_connection_none;
        const uint32_t post_oui_delay = 30; // 30ms
 
        DC_LOGGER_INIT(link->ctx->logger);
@@ -896,7 +895,6 @@ static bool detect_link_and_local_sink(struct dc_link *link,
 
        link_disconnect_sink(link);
        if (new_connection_type != dc_connection_none) {
-               pre_connection_type = link->type;
                link->type = new_connection_type;
                link->link_state_valid = false;