Skip to contentSkip to conversation

drm/amd/display: remove unnecessary conversion to bool

PATCH Applied Chen Zhou 3 participants 3 messages Jan 10, 2020 – Jan 11, 2020

Subsystems (3)
lore
Share & tools
lore

Chen Zhou

author
#0 lore raw

PATCH 1/1 drm/amd/display: remove unnecessary conversion to bool

The conversion to bool is not needed, remove it.

---
 drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c +1 -1
index 504055f..a004e8e 100644
@@ -2792,7 +2792,7 @@ static bool retrieve_link_cap(struct dc_link *link)
 			dpcd_data[DP_TRAINING_AUX_RD_INTERVAL];
 
 		link->dpcd_caps.ext_receiver_cap_field_present =
-				aux_rd_interval.bits.EXT_RECEIVER_CAP_FIELD_PRESENT == 1 ? true:false;
+				aux_rd_interval.bits.EXT_RECEIVER_CAP_FIELD_PRESENT == 1;
 
 		if (aux_rd_interval.bits.EXT_RECEIVER_CAP_FIELD_PRESENT == 1) {
 			uint8_t ext_cap_data[16];
Signature · 1 line
2.7.4
Reviewed-by on v1 1/1
#1 lore raw
Quoted 2 lines · Chen Zhou

The conversion to bool is not needed, remove it.

Quoted 1 line

Harry

Quoted 10 lines
---
 drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c +0 -0
index 504055f..a004e8e 100644

drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c static bool retrieve_link_cap(struct dc_link *link) · line 2798

Quoted 8 lines
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c +1 -1
@@ -2792,7 +2792,7 @@ static bool retrieve_link_cap(struct dc_link *link)
 			dpcd_data[DP_TRAINING_AUX_RD_INTERVAL];
 
 		link->dpcd_caps.ext_receiver_cap_field_present =
-				aux_rd_interval.bits.EXT_RECEIVER_CAP_FIELD_PRESENT == 1 ? true:false;
+				aux_rd_interval.bits.EXT_RECEIVER_CAP_FIELD_PRESENT == 1;
 
 		if (aux_rd_interval.bits.EXT_RECEIVER_CAP_FIELD_PRESENT == 1) {
 			uint8_t ext_cap_data[16];

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Applied
#2 lore raw

Applied. thanks!

Quoted 24 lines · Harry Wentland
Quoted 2 lines · Chen Zhou

The conversion to bool is not needed, remove it.

Quoted 1 line

Harry

Quoted 15 lines
---
 drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c +1 -1
index 504055f..a004e8e 100644
@@ -2792,7 +2792,7 @@ static bool retrieve_link_cap(struct dc_link *link)
                      dpcd_data[DP_TRAINING_AUX_RD_INTERVAL];
 
              link->dpcd_caps.ext_receiver_cap_field_present =
-                             aux_rd_interval.bits.EXT_RECEIVER_CAP_FIELD_PRESENT == 1 ? true:false;
+                             aux_rd_interval.bits.EXT_RECEIVER_CAP_FIELD_PRESENT == 1;
 
Quoted 7 lines

drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c static bool retrieve_link_cap(struct dc_link *link) · line 2798

Quoted 3 lines
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c +0 -0
              if (aux_rd_interval.bits.EXT_RECEIVER_CAP_FIELD_PRESENT == 1) {
                      uint8_t ext_cap_data[16];

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx