Skip to content

Commit a055658

Browse files
LiaoYuanhong-vivoalexdeucher
authored andcommitted
drm/radeon/pm: Remove redundant ternary operators
For ternary operators in the form of "a ? true : false", if 'a' itself returns a boolean result, the ternary operator can be omitted. Remove redundant ternary operators to clean up the code. Signed-off-by: Liao Yuanhong <liaoyuanhong@vivo.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 220c7a2 commit a055658

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

drivers/gpu/drm/radeon/radeon_pm.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -907,8 +907,7 @@ static void radeon_dpm_thermal_work_handler(struct work_struct *work)
907907

908908
static bool radeon_dpm_single_display(struct radeon_device *rdev)
909909
{
910-
bool single_display = (rdev->pm.dpm.new_active_crtc_count < 2) ?
911-
true : false;
910+
bool single_display = rdev->pm.dpm.new_active_crtc_count < 2;
912911

913912
/* check if the vblank period is too short to adjust the mclk */
914913
if (single_display && rdev->asic->dpm.vblank_too_short) {

0 commit comments

Comments
 (0)