Commit fde789e8 authored by Matthew Auld's avatar Matthew Auld Committed by Christian König

drm/i915/ttm: fix sparse warning

Sparse complains with:

drivers/gpu/drm/i915/gem/i915_gem_ttm.c:1066:21: sparse:
	expected restricted vm_fault_t [assigned] [usertype] ret
drivers/gpu/drm/i915/gem/i915_gem_ttm.c:1066:21: sparse: got int

Fixes: 516198d3 ("drm/i915: audit bo->resource usage v3")
Reported-by: default avatarkernel test robot <lkp@intel.com>
Signed-off-by: default avatarMatthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230130101230.25347-1-matthew.auld@intel.comReviewed-by: default avatarNirmoy Das <nirmoy.das@intel.com>
Acked-by: default avatarChristian König <ckoenig.leichtzumerken@gmail.com>
Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
parent ec6ec9c6
...@@ -1067,11 +1067,12 @@ static vm_fault_t vm_fault_ttm(struct vm_fault *vmf) ...@@ -1067,11 +1067,12 @@ static vm_fault_t vm_fault_ttm(struct vm_fault *vmf)
.interruptible = true, .interruptible = true,
.no_wait_gpu = true, /* should be idle already */ .no_wait_gpu = true, /* should be idle already */
}; };
int err;
GEM_BUG_ON(!bo->ttm || !(bo->ttm->page_flags & TTM_TT_FLAG_SWAPPED)); GEM_BUG_ON(!bo->ttm || !(bo->ttm->page_flags & TTM_TT_FLAG_SWAPPED));
ret = ttm_bo_validate(bo, i915_ttm_sys_placement(), &ctx); err = ttm_bo_validate(bo, i915_ttm_sys_placement(), &ctx);
if (ret) { if (err) {
dma_resv_unlock(bo->base.resv); dma_resv_unlock(bo->base.resv);
return VM_FAULT_SIGBUS; return VM_FAULT_SIGBUS;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment