drm/amdgpu: Remove two ! operations in an if condition
authorAlex Xie <AlexBin.Xie@amd.com>
Wed, 31 May 2017 03:50:10 +0000 (23:50 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 31 May 2017 18:16:38 +0000 (14:16 -0400)
 Make the code easier to understand.

Signed-off-by: Alex Xie <AlexBin.Xie@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c

index 7a323f91a10bceb03286235b326904a544627181..90392a15fcb725bed3cbce6aef192f763b5c55e0 100644 (file)
@@ -680,9 +680,8 @@ bool amdgpu_vm_need_pipeline_sync(struct amdgpu_ring *ring,
 
        if (amdgpu_vm_had_gpu_reset(adev, id))
                return true;
-       if (!vm_flush_needed && !gds_switch_needed)
-               return false;
-       return true;
+
+       return vm_flush_needed || gds_switch_needed;
 }
 
 /**