Skip to contentSkip to conversation

drm/amd/display: Simplify bool conversion

PATCH Applied Yang Li 2 participants 2 messages Feb 10, 2023 – Feb 13, 2023

Subsystems (3)
lore
Share & tools
lore

Yang Li

author
#0 lore raw

PATCH 1/1 drm/amd/display: Simplify bool conversion

./drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c:1610:68-73: WARNING: conversion to bool not needed here

---
 .../gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c +1 -1
index 24d356ebd7a9..cb38afde3fc8 100644
@@ -1607,7 +1607,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.20.1.7.g153144c
Applied
#1 lore raw

Applied. Thanks.

Quoted 26 lines · Yang Li

./drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c:1610:68-73: WARNING: conversion to bool not needed here

---
 .../gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c +1 -2
index 24d356ebd7a9..cb38afde3fc8 100644
@@ -1607,7 +1607,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];
--

2.20.1.7.g153144c