diff options
author | Eric Yang <Eric.Yang2@amd.com> | 2021-12-10 12:28:57 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2022-01-18 17:41:18 -0500 |
commit | fd9048dd4425a9dc252153c8b72369f1969a35b3 (patch) | |
tree | f045293fba1e60ccd320eddd495f6d5c99095a82 /drivers/gpu/drm/amd/display | |
parent | 7aba117ac9e01dc58afe29490f50025add9d388b (diff) | |
download | linux-fd9048dd4425a9dc252153c8b72369f1969a35b3.tar.gz linux-fd9048dd4425a9dc252153c8b72369f1969a35b3.tar.bz2 linux-fd9048dd4425a9dc252153c8b72369f1969a35b3.zip |
drm/amd/display: adjust bit comparison to be more type safe
Might potentially have truncation problem with the implicit casting
Reviewed-by: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com>
Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Eric Yang <Eric.Yang2@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display')
-rw-r--r-- | drivers/gpu/drm/amd/display/dmub/src/dmub_dcn31.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/display/dmub/src/dmub_dcn31.c b/drivers/gpu/drm/amd/display/dmub/src/dmub_dcn31.c index fa0569174aec..82c651535628 100644 --- a/drivers/gpu/drm/amd/display/dmub/src/dmub_dcn31.c +++ b/drivers/gpu/drm/amd/display/dmub/src/dmub_dcn31.c @@ -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) { 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; } |