Commit db51c5d9 authored by Liao Yuanhong's avatar Liao Yuanhong Committed by Alex Deucher
Browse files

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: default avatarLiao Yuanhong <liaoyuanhong@vivo.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 53c271b9
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -771,8 +771,7 @@ static struct amdgpu_ps *amdgpu_dpm_pick_power_state(struct amdgpu_device *adev,
	int i;
	struct amdgpu_ps *ps;
	u32 ui_class;
	bool single_display = (adev->pm.dpm.new_active_crtc_count < 2) ?
		true : false;
	bool single_display = adev->pm.dpm.new_active_crtc_count < 2;

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