Skip to content

Commit db51c5d

Browse files
LiaoYuanhong-vivoalexdeucher
authored andcommitted
amdgpu/pm/legacy: 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 53c271b commit db51c5d

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

drivers/gpu/drm/amd/pm/legacy-dpm/legacy_dpm.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -771,8 +771,7 @@ static struct amdgpu_ps *amdgpu_dpm_pick_power_state(struct amdgpu_device *adev,
771771
int i;
772772
struct amdgpu_ps *ps;
773773
u32 ui_class;
774-
bool single_display = (adev->pm.dpm.new_active_crtc_count < 2) ?
775-
true : false;
774+
bool single_display = adev->pm.dpm.new_active_crtc_count < 2;
776775

777776
/* check if the vblank period is too short to adjust the mclk */
778777
if (single_display && adev->powerplay.pp_funcs->vblank_too_short) {

0 commit comments

Comments
 (0)