mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 00:22:00 +02:00
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: Christian König <christian.koenig@amd.com> Signed-off-by: Liao Yuanhong <liaoyuanhong@vivo.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
7670daf65a
commit
d261e744af
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user