diff options
author | Gustavo A. R. Silva <gustavo@embeddedor.com> | 2019-01-03 15:01:46 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2019-01-14 15:04:50 -0500 |
commit | 0855c9c9ec28451858aeb1e512d2d25fd8397828 (patch) | |
tree | cae3a7c325c7e31530b0b8dc19a62a2ccc84cbe6 /drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | |
parent | 72d3f59205ffae6827b4af525a7963f181322e35 (diff) |
drm/amdgpu_vm: fix boolean expressions
Fix boolean expressions by using logical AND operator '&&'
instead of bitwise operator '&'.
This issue was detected with the help of Coccinelle.
Fixes: 9a4b7d4c769e ("drm/amdgpu: Add vm context module param")
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index d2ea5ce2cefb..ccffcadfd73b 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | |||
@@ -3003,7 +3003,7 @@ int amdgpu_vm_init(struct amdgpu_device *adev, struct amdgpu_vm *vm, | |||
3003 | } | 3003 | } |
3004 | DRM_DEBUG_DRIVER("VM update mode is %s\n", | 3004 | DRM_DEBUG_DRIVER("VM update mode is %s\n", |
3005 | vm->use_cpu_for_update ? "CPU" : "SDMA"); | 3005 | vm->use_cpu_for_update ? "CPU" : "SDMA"); |
3006 | WARN_ONCE((vm->use_cpu_for_update & !amdgpu_gmc_vram_full_visible(&adev->gmc)), | 3006 | WARN_ONCE((vm->use_cpu_for_update && !amdgpu_gmc_vram_full_visible(&adev->gmc)), |
3007 | "CPU update of VM recommended only for large BAR system\n"); | 3007 | "CPU update of VM recommended only for large BAR system\n"); |
3008 | vm->last_update = NULL; | 3008 | vm->last_update = NULL; |
3009 | 3009 | ||
@@ -3133,7 +3133,7 @@ int amdgpu_vm_make_compute(struct amdgpu_device *adev, struct amdgpu_vm *vm, uns | |||
3133 | vm->pte_support_ats = pte_support_ats; | 3133 | vm->pte_support_ats = pte_support_ats; |
3134 | DRM_DEBUG_DRIVER("VM update mode is %s\n", | 3134 | DRM_DEBUG_DRIVER("VM update mode is %s\n", |
3135 | vm->use_cpu_for_update ? "CPU" : "SDMA"); | 3135 | vm->use_cpu_for_update ? "CPU" : "SDMA"); |
3136 | WARN_ONCE((vm->use_cpu_for_update & !amdgpu_gmc_vram_full_visible(&adev->gmc)), | 3136 | WARN_ONCE((vm->use_cpu_for_update && !amdgpu_gmc_vram_full_visible(&adev->gmc)), |
3137 | "CPU update of VM recommended only for large BAR system\n"); | 3137 | "CPU update of VM recommended only for large BAR system\n"); |
3138 | 3138 | ||
3139 | if (vm->pasid) { | 3139 | if (vm->pasid) { |