mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 21:51:05 +00:00
ttm: use NULL instead of 0 for ttm_bo_reserve()'s pointer arg.
Fix a sparse warning: ttm_bo_reserve()'s last argument is a pointer to a struct, so use NULL as nullpointer. Signed-off-by: Martin Kepplinger <martink@posteo.de> Reviewed-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
2023d84d2c
commit
0eff2a24d6
1 changed files with 7 additions and 7 deletions
|
@ -412,7 +412,7 @@ static void ttm_bo_cleanup_refs_or_queue(struct ttm_buffer_object *bo)
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
spin_lock(&glob->lru_lock);
|
spin_lock(&glob->lru_lock);
|
||||||
ret = __ttm_bo_reserve(bo, false, true, false, 0);
|
ret = __ttm_bo_reserve(bo, false, true, false, NULL);
|
||||||
|
|
||||||
spin_lock(&bdev->fence_lock);
|
spin_lock(&bdev->fence_lock);
|
||||||
(void) ttm_bo_wait(bo, false, false, true);
|
(void) ttm_bo_wait(bo, false, false, true);
|
||||||
|
@ -514,7 +514,7 @@ static int ttm_bo_cleanup_refs_and_unlock(struct ttm_buffer_object *bo,
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
spin_lock(&glob->lru_lock);
|
spin_lock(&glob->lru_lock);
|
||||||
ret = __ttm_bo_reserve(bo, false, true, false, 0);
|
ret = __ttm_bo_reserve(bo, false, true, false, NULL);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We raced, and lost, someone else holds the reservation now,
|
* We raced, and lost, someone else holds the reservation now,
|
||||||
|
@ -577,11 +577,11 @@ static int ttm_bo_delayed_delete(struct ttm_bo_device *bdev, bool remove_all)
|
||||||
kref_get(&nentry->list_kref);
|
kref_get(&nentry->list_kref);
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = __ttm_bo_reserve(entry, false, true, false, 0);
|
ret = __ttm_bo_reserve(entry, false, true, false, NULL);
|
||||||
if (remove_all && ret) {
|
if (remove_all && ret) {
|
||||||
spin_unlock(&glob->lru_lock);
|
spin_unlock(&glob->lru_lock);
|
||||||
ret = __ttm_bo_reserve(entry, false, false,
|
ret = __ttm_bo_reserve(entry, false, false,
|
||||||
false, 0);
|
false, NULL);
|
||||||
spin_lock(&glob->lru_lock);
|
spin_lock(&glob->lru_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -726,7 +726,7 @@ static int ttm_mem_evict_first(struct ttm_bo_device *bdev,
|
||||||
|
|
||||||
spin_lock(&glob->lru_lock);
|
spin_lock(&glob->lru_lock);
|
||||||
list_for_each_entry(bo, &man->lru, lru) {
|
list_for_each_entry(bo, &man->lru, lru) {
|
||||||
ret = __ttm_bo_reserve(bo, false, true, false, 0);
|
ret = __ttm_bo_reserve(bo, false, true, false, NULL);
|
||||||
if (!ret)
|
if (!ret)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1595,7 +1595,7 @@ int ttm_bo_synccpu_write_grab(struct ttm_buffer_object *bo, bool no_wait)
|
||||||
* Using ttm_bo_reserve makes sure the lru lists are updated.
|
* Using ttm_bo_reserve makes sure the lru lists are updated.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
ret = ttm_bo_reserve(bo, true, no_wait, false, 0);
|
ret = ttm_bo_reserve(bo, true, no_wait, false, NULL);
|
||||||
if (unlikely(ret != 0))
|
if (unlikely(ret != 0))
|
||||||
return ret;
|
return ret;
|
||||||
spin_lock(&bdev->fence_lock);
|
spin_lock(&bdev->fence_lock);
|
||||||
|
@ -1630,7 +1630,7 @@ static int ttm_bo_swapout(struct ttm_mem_shrink *shrink)
|
||||||
|
|
||||||
spin_lock(&glob->lru_lock);
|
spin_lock(&glob->lru_lock);
|
||||||
list_for_each_entry(bo, &glob->swap_lru, swap) {
|
list_for_each_entry(bo, &glob->swap_lru, swap) {
|
||||||
ret = __ttm_bo_reserve(bo, false, true, false, 0);
|
ret = __ttm_bo_reserve(bo, false, true, false, NULL);
|
||||||
if (!ret)
|
if (!ret)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue