gallium: use list_is_linked
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8110>
This commit is contained in:
parent
c5ecb59d97
commit
aa7b497d9a
|
@ -41,7 +41,7 @@ destroy_buffer_locked(struct pb_cache_entry *entry)
|
|||
struct pb_buffer *buf = entry->buffer;
|
||||
|
||||
assert(!pipe_is_referenced(&buf->reference));
|
||||
if (entry->head.next) {
|
||||
if (list_is_linked(&entry->head)) {
|
||||
list_del(&entry->head);
|
||||
assert(mgr->num_buffers);
|
||||
--mgr->num_buffers;
|
||||
|
|
|
@ -60,7 +60,7 @@ pb_slab_reclaim(struct pb_slabs *slabs, struct pb_slab_entry *entry)
|
|||
slab->num_free++;
|
||||
|
||||
/* Add slab to the group's list if it isn't already linked. */
|
||||
if (!slab->head.next) {
|
||||
if (!list_is_linked(&slab->head)) {
|
||||
struct pb_slab_group *group = &slabs->groups[entry->group_index];
|
||||
list_addtail(&slab->head, &group->slabs);
|
||||
}
|
||||
|
|
|
@ -469,7 +469,7 @@ tc_call_destroy_query(struct pipe_context *pipe, union tc_payload *payload)
|
|||
{
|
||||
struct threaded_query *tq = threaded_query(payload->query);
|
||||
|
||||
if (tq->head_unflushed.next)
|
||||
if (list_is_linked(&tq->head_unflushed))
|
||||
list_del(&tq->head_unflushed);
|
||||
|
||||
pipe->destroy_query(pipe, payload->query);
|
||||
|
@ -510,7 +510,7 @@ tc_call_end_query(struct pipe_context *pipe, union tc_payload *payload)
|
|||
struct tc_end_query_payload *p = (struct tc_end_query_payload *)payload;
|
||||
struct threaded_query *tq = threaded_query(p->query);
|
||||
|
||||
if (!tq->head_unflushed.next)
|
||||
if (!list_is_linked(&tq->head_unflushed))
|
||||
list_add(&tq->head_unflushed, &p->tc->unflushed_queries);
|
||||
|
||||
pipe->end_query(pipe, p->query);
|
||||
|
@ -548,7 +548,7 @@ tc_get_query_result(struct pipe_context *_pipe,
|
|||
|
||||
if (success) {
|
||||
tq->flushed = true;
|
||||
if (tq->head_unflushed.next) {
|
||||
if (list_is_linked(&tq->head_unflushed)) {
|
||||
/* This is safe because it can only happen after we sync'd. */
|
||||
list_del(&tq->head_unflushed);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue