Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amdgpu: Failed to check various return code

Clean up code to quiet the compiler on us failing to check the return
code.

Signed-off-by: Andrew Martin <Andrew.Martin@amd.com>
Reviewed-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Andrew Martin and committed by
Alex Deucher
357ef5b3 88a45aa6

+8 -8
+1 -1
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c
··· 368 368 { 369 369 struct amdgpu_bo **bo = (struct amdgpu_bo **) mem_obj; 370 370 371 - amdgpu_bo_reserve(*bo, true); 371 + (void)amdgpu_bo_reserve(*bo, true); 372 372 amdgpu_bo_kunmap(*bo); 373 373 amdgpu_bo_unpin(*bo); 374 374 amdgpu_bo_unreserve(*bo);
+7 -7
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
··· 730 730 return; 731 731 732 732 amdgpu_bo_placement_from_domain(bo, AMDGPU_GEM_DOMAIN_CPU); 733 - ttm_bo_validate(&bo->tbo, &bo->placement, &ctx); 733 + (void)ttm_bo_validate(&bo->tbo, &bo->placement, &ctx); 734 734 735 735 dma_unmap_sgtable(adev->dev, ttm->sg, direction, 0); 736 736 sg_free_table(ttm->sg); ··· 779 779 } 780 780 781 781 amdgpu_bo_placement_from_domain(bo, AMDGPU_GEM_DOMAIN_CPU); 782 - ttm_bo_validate(&bo->tbo, &bo->placement, &ctx); 782 + (void)ttm_bo_validate(&bo->tbo, &bo->placement, &ctx); 783 783 784 784 dir = mem->alloc_flags & KFD_IOC_ALLOC_MEM_FLAGS_WRITABLE ? 785 785 DMA_BIDIRECTIONAL : DMA_TO_DEVICE; ··· 989 989 if (!attachment[i]) 990 990 continue; 991 991 if (attachment[i]->bo_va) { 992 - amdgpu_bo_reserve(bo[i], true); 992 + (void)amdgpu_bo_reserve(bo[i], true); 993 993 if (--attachment[i]->bo_va->ref_count == 0) 994 994 amdgpu_vm_bo_del(adev, attachment[i]->bo_va); 995 995 amdgpu_bo_unreserve(bo[i]); ··· 1259 1259 return -EBUSY; 1260 1260 } 1261 1261 1262 - amdgpu_vm_bo_unmap(adev, bo_va, entry->va); 1262 + (void)amdgpu_vm_bo_unmap(adev, bo_va, entry->va); 1263 1263 1264 - amdgpu_vm_clear_freed(adev, vm, &bo_va->last_pt_update); 1264 + (void)amdgpu_vm_clear_freed(adev, vm, &bo_va->last_pt_update); 1265 1265 1266 - amdgpu_sync_fence(sync, bo_va->last_pt_update); 1266 + (void)amdgpu_sync_fence(sync, bo_va->last_pt_update); 1267 1267 1268 1268 return 0; 1269 1269 } ··· 2352 2352 { 2353 2353 struct amdgpu_bo *bo = mem->bo; 2354 2354 2355 - amdgpu_bo_reserve(bo, true); 2355 + (void)amdgpu_bo_reserve(bo, true); 2356 2356 amdgpu_bo_kunmap(bo); 2357 2357 amdgpu_bo_unpin(bo); 2358 2358 amdgpu_bo_unreserve(bo);