From: Alex Xie Date: Wed, 31 May 2017 03:50:10 +0000 (-0400) Subject: drm/amdgpu: Remove two ! operations in an if condition X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=bb37b67d5729926ef0bf3dafdb5521b932aeb809;p=openwrt%2Fstaging%2Fblogic.git drm/amdgpu: Remove two ! operations in an if condition Make the code easier to understand. Signed-off-by: Alex Xie Reviewed-by: Michel Dänzer Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index 7a323f91a10b..90392a15fcb7 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c @@ -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; } /**