mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-02-15 13:14:59 -05:00
drm/amdgpu/gmc: 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:
committed by
Alex Deucher
parent
d261e744af
commit
60df3e81d7
@@ -963,8 +963,7 @@ static int gmc_v10_0_gart_enable(struct amdgpu_device *adev)
|
||||
/* Flush HDP after it is initialized */
|
||||
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;
|
||||
|
||||
if (!adev->in_s0ix)
|
||||
adev->gfxhub.funcs->set_fault_enable_default(adev, value);
|
||||
|
||||
@@ -905,8 +905,7 @@ static int gmc_v11_0_gart_enable(struct amdgpu_device *adev)
|
||||
/* Flush HDP after it is initialized */
|
||||
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->mmhub.funcs->set_fault_enable_default(adev, value);
|
||||
gmc_v11_0_flush_gpu_tlb(adev, 0, AMDGPU_MMHUB0(0), 0);
|
||||
|
||||
@@ -893,8 +893,7 @@ static int gmc_v12_0_gart_enable(struct amdgpu_device *adev)
|
||||
/* Flush HDP after it is initialized */
|
||||
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->mmhub.funcs->set_fault_enable_default(adev, value);
|
||||
gmc_v12_0_flush_gpu_tlb(adev, 0, AMDGPU_MMHUB0(0), 0);
|
||||
|
||||
Reference in New Issue
Block a user