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

drm/amd/pm/powerplay/hwmgr/ppatomctrl: 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. Swap variable positions
on either side of '!=' to enhance readability.

Signed-off-by: default avatarLiao Yuanhong <liaoyuanhong@vivo.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent db51c5d9
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -563,8 +563,8 @@ bool atomctrl_is_voltage_controlled_by_gpio_v3(
	PP_ASSERT_WITH_CODE((NULL != voltage_info),
			"Could not find Voltage Table in BIOS.", return false;);

	ret = (NULL != atomctrl_lookup_voltage_type_v3
			(voltage_info, voltage_type, voltage_mode)) ? true : false;
	ret = atomctrl_lookup_voltage_type_v3
			(voltage_info, voltage_type, voltage_mode) != NULL;

	return ret;
}