Skip to contentSkip to conversation

drm/amd/display: Remove the unused variable ds_port

PATCH Applied Jiapeng Chong 2 participants 2 messages Feb 10, 2023 – Feb 13, 2023

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

PATCH 1/1 drm/amd/display: Remove the unused variable ds_port

Variable ds_port is not effectively used, so delete it.

drivers/gpu/drm/amd/amdgpu/../display/dc/link/protocols/link_dp_capability.c:280:35: warning: variable ‘ds_port’ set but not used.

---
 .../drm/amd/display/dc/link/protocols/link_dp_capability.c    | 4 ----
 1 file changed, 4 deletions(-)
drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c +0 -4
index 24d356ebd7a9..816bf4ff8017 100644
@@ -277,7 +277,6 @@ static void dp_wa_power_up_0010FA(struct dc_link *link, uint8_t *dpcd_data,
 		int length)
 {
 	int retry = 0;
-	union dp_downstream_port_present ds_port = { 0 };
 
 	if (!link->dpcd_caps.dpcd_rev.raw) {
 		do {
@@ -290,9 +289,6 @@ static void dp_wa_power_up_0010FA(struct dc_link *link, uint8_t *dpcd_data,
 		} while (retry++ < 4 && !link->dpcd_caps.dpcd_rev.raw);
 	}
 
-	ds_port.byte = dpcd_data[DP_DOWNSTREAMPORT_PRESENT -
-				 DP_DPCD_REV];
-
 	if (link->dpcd_caps.dongle_type == DISPLAY_DONGLE_DP_VGA_CONVERTER) {
 		switch (link->dpcd_caps.branch_dev_id) {
 		/* 0010FA active dongles (DP-VGA, DP-DLDVI converters) power down
Signature · 1 line
2.20.1.7.g153144c
Applied
#1 lore raw

Applied. Thanks!

Quoted 37 lines · Jiapeng Chong

Variable ds_port is not effectively used, so delete it.

drivers/gpu/drm/amd/amdgpu/../display/dc/link/protocols/link_dp_capability.c:280:35: warning: variable ‘ds_port’ set but not used.

---
 .../drm/amd/display/dc/link/protocols/link_dp_capability.c    | 4 ----
 1 file changed, 4 deletions(-)
drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c +0 -5
index 24d356ebd7a9..816bf4ff8017 100644
@@ -277,7 +277,6 @@ static void dp_wa_power_up_0010FA(struct dc_link *link, uint8_t *dpcd_data,
                int length)
 {
        int retry = 0;
-       union dp_downstream_port_present ds_port = { 0 };
 
        if (!link->dpcd_caps.dpcd_rev.raw) {
                do {
@@ -290,9 +289,6 @@ static void dp_wa_power_up_0010FA(struct dc_link *link, uint8_t *dpcd_data,
                } while (retry++ < 4 && !link->dpcd_caps.dpcd_rev.raw);
        }
 
-       ds_port.byte = dpcd_data[DP_DOWNSTREAMPORT_PRESENT -
-                                DP_DPCD_REV];
-
        if (link->dpcd_caps.dongle_type == DISPLAY_DONGLE_DP_VGA_CONVERTER) {
                switch (link->dpcd_caps.branch_dev_id) {
                /* 0010FA active dongles (DP-VGA, DP-DLDVI converters) power down
--

2.20.1.7.g153144c