drm/amdgpu: use true and false for bool initialisations
authorSumera Priyadarsini <sylphrenadin@gmail.com>
Mon, 26 Oct 2020 18:12:42 +0000 (23:42 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 26 Oct 2020 20:51:45 +0000 (16:51 -0400)
Bool initialisation should use 'true' and 'false' values instead of 0
and 1.

Modify amdgpu_amdkfd_gpuvm.c to initialise variable is_imported
to false instead of 0.

Issue found with Coccinelle.

Signed-off-by: Sumera Priyadarsini <sylphrenadin@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c

index c21f82c..4324479 100644 (file)
@@ -1287,7 +1287,7 @@ int amdgpu_amdkfd_gpuvm_free_memory_of_gpu(
        struct ttm_validate_buffer *bo_list_entry;
        unsigned int mapped_to_gpu_memory;
        int ret;
-       bool is_imported = 0;
+       bool is_imported = false;
 
        mutex_lock(&mem->lock);
        mapped_to_gpu_memory = mem->mapped_to_gpu_memory;