Commit fd9048dd authored by Eric Yang's avatar Eric Yang Committed by Alex Deucher

drm/amd/display: adjust bit comparison to be more type safe

Might potentially have truncation problem with the implicit casting
Reviewed-by: default avatarNicholas Kazlauskas <Nicholas.Kazlauskas@amd.com>
Acked-by: default avatarRodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: default avatarEric Yang <Eric.Yang2@amd.com>
Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 7aba117a
...@@ -441,7 +441,7 @@ void dmub_dcn31_get_diagnostic_data(struct dmub_srv *dmub, struct dmub_diagnosti ...@@ -441,7 +441,7 @@ void dmub_dcn31_get_diagnostic_data(struct dmub_srv *dmub, struct dmub_diagnosti
bool dmub_dcn31_should_detect(struct dmub_srv *dmub) bool dmub_dcn31_should_detect(struct dmub_srv *dmub)
{ {
uint32_t fw_boot_status = REG_READ(DMCUB_SCRATCH0); uint32_t fw_boot_status = REG_READ(DMCUB_SCRATCH0);
bool should_detect = fw_boot_status & DMUB_FW_BOOT_STATUS_BIT_DETECTION_REQUIRED; bool should_detect = (fw_boot_status & DMUB_FW_BOOT_STATUS_BIT_DETECTION_REQUIRED) != 0;
return should_detect; return should_detect;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment