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

drm/amdgpu/gfx: Remove redundant ternary operators



For ternary operators in the form of "a ? false : true", if 'a' itself
returns a boolean result, the ternary operator can be omitted. Remove
redundant ternary operators to clean up the code.

Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarLiao Yuanhong <liaoyuanhong@vivo.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 7670daf6
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -4643,8 +4643,7 @@ static int gfx_v11_0_gfxhub_enable(struct amdgpu_device *adev)

	amdgpu_device_flush_hdp(adev, NULL);

	value = (amdgpu_vm_fault_stop == AMDGPU_VM_FAULT_STOP_ALWAYS) ?
		false : true;
	value = amdgpu_vm_fault_stop != AMDGPU_VM_FAULT_STOP_ALWAYS;

	adev->gfxhub.funcs->set_fault_enable_default(adev, value);
	/* TODO investigate why this and the hdp flush above is needed,
+1 −2
Original line number Diff line number Diff line
@@ -3524,8 +3524,7 @@ static int gfx_v12_0_gfxhub_enable(struct amdgpu_device *adev)

	amdgpu_device_flush_hdp(adev, NULL);

	value = (amdgpu_vm_fault_stop == AMDGPU_VM_FAULT_STOP_ALWAYS) ?
		false : true;
	value = amdgpu_vm_fault_stop != AMDGPU_VM_FAULT_STOP_ALWAYS;

	adev->gfxhub.funcs->set_fault_enable_default(adev, value);
	/* TODO investigate why this and the hdp flush above is needed,