From: Timothy Arceri Date: Sun, 27 Oct 2019 23:11:53 +0000 (+1100) Subject: util: remove LIST_DEL macro X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c578600489e35abb481816c87124b1dc6b279655;p=mesa.git util: remove LIST_DEL macro Just use the inlined function directly. The macro was replaced with the function in ebe304fa540f. Reviewed-by: Eric Engestrom --- diff --git a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c index 3c629cfcda5..bfa02efd3e1 100644 --- a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c +++ b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c @@ -262,7 +262,7 @@ static void radv_amdgpu_winsys_bo_destroy(struct radeon_winsys_bo *_bo) } else { if (bo->ws->debug_all_bos) { pthread_mutex_lock(&bo->ws->global_bo_list_lock); - LIST_DEL(&bo->global_list_item); + list_del(&bo->global_list_item); bo->ws->num_buffers--; pthread_mutex_unlock(&bo->ws->global_bo_list_lock); } diff --git a/src/gallium/auxiliary/hud/hud_context.c b/src/gallium/auxiliary/hud/hud_context.c index 6cfee81559e..f95f07d1ab0 100644 --- a/src/gallium/auxiliary/hud/hud_context.c +++ b/src/gallium/auxiliary/hud/hud_context.c @@ -696,7 +696,7 @@ hud_stop_queries(struct hud_context *hud, struct pipe_context *pipe) */ if (gr->current_value < LIST_ENTRY(struct hud_graph, next, head)->current_value) { - LIST_DEL(&gr->head); + list_del(&gr->head); list_add(&gr->head, &next->head); } } @@ -1752,10 +1752,10 @@ hud_unset_record_context(struct hud_context *hud) LIST_FOR_EACH_ENTRY_SAFE(pane, pane_tmp, &hud->pane_list, head) { LIST_FOR_EACH_ENTRY_SAFE(graph, graph_tmp, &pane->graph_list, head) { - LIST_DEL(&graph->head); + list_del(&graph->head); hud_graph_destroy(graph, pipe); } - LIST_DEL(&pane->head); + list_del(&pane->head); FREE(pane); } diff --git a/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c b/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c index b8b53fd8275..cae87520020 100644 --- a/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c +++ b/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c @@ -250,7 +250,7 @@ fenced_buffer_destroy_locked(struct fenced_manager *fenced_mgr, assert(!fenced_buf->fence); assert(fenced_buf->head.prev); assert(fenced_buf->head.next); - LIST_DEL(&fenced_buf->head); + list_del(&fenced_buf->head); assert(fenced_mgr->num_unfenced); --fenced_mgr->num_unfenced; @@ -276,7 +276,7 @@ fenced_buffer_add_locked(struct fenced_manager *fenced_mgr, p_atomic_inc(&fenced_buf->base.reference.count); - LIST_DEL(&fenced_buf->head); + list_del(&fenced_buf->head); assert(fenced_mgr->num_unfenced); --fenced_mgr->num_unfenced; list_addtail(&fenced_buf->head, &fenced_mgr->fenced); @@ -305,7 +305,7 @@ fenced_buffer_remove_locked(struct fenced_manager *fenced_mgr, assert(fenced_buf->head.prev); assert(fenced_buf->head.next); - LIST_DEL(&fenced_buf->head); + list_del(&fenced_buf->head); assert(fenced_mgr->num_fenced); --fenced_mgr->num_fenced; diff --git a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c index a5d211bc6d4..8cedc42b916 100644 --- a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c +++ b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c @@ -236,7 +236,7 @@ pb_debug_buffer_destroy(struct pb_buffer *_buf) pb_debug_buffer_check(buf); mtx_lock(&mgr->mutex); - LIST_DEL(&buf->head); + list_del(&buf->head); mtx_unlock(&mgr->mutex); mtx_destroy(&buf->mutex); diff --git a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_slab.c b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_slab.c index 03035497cfc..dd59733fe9b 100644 --- a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_slab.c +++ b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_slab.c @@ -204,7 +204,7 @@ pb_slab_buffer_destroy(struct pb_buffer *_buf) buf->mapCount = 0; - LIST_DEL(list); + list_del(list); list_addtail(list, &slab->freeBuffers); slab->numFree++; diff --git a/src/gallium/auxiliary/pipebuffer/pb_cache.c b/src/gallium/auxiliary/pipebuffer/pb_cache.c index cc1b1fbed00..ec878202f08 100644 --- a/src/gallium/auxiliary/pipebuffer/pb_cache.c +++ b/src/gallium/auxiliary/pipebuffer/pb_cache.c @@ -42,7 +42,7 @@ destroy_buffer_locked(struct pb_cache_entry *entry) assert(!pipe_is_referenced(&buf->reference)); if (entry->head.next) { - LIST_DEL(&entry->head); + list_del(&entry->head); assert(mgr->num_buffers); --mgr->num_buffers; mgr->cache_size -= buf->size; @@ -208,7 +208,7 @@ pb_cache_reclaim_buffer(struct pb_cache *mgr, pb_size size, struct pb_buffer *buf = entry->buffer; mgr->cache_size -= buf->size; - LIST_DEL(&entry->head); + list_del(&entry->head); --mgr->num_buffers; mtx_unlock(&mgr->mutex); /* Increase refcount */ diff --git a/src/gallium/auxiliary/pipebuffer/pb_slab.c b/src/gallium/auxiliary/pipebuffer/pb_slab.c index 3ae24cf5405..844bf3535f6 100644 --- a/src/gallium/auxiliary/pipebuffer/pb_slab.c +++ b/src/gallium/auxiliary/pipebuffer/pb_slab.c @@ -55,7 +55,7 @@ pb_slab_reclaim(struct pb_slabs *slabs, struct pb_slab_entry *entry) { struct pb_slab *slab = entry->slab; - LIST_DEL(&entry->head); /* remove from reclaim list */ + list_del(&entry->head); /* remove from reclaim list */ list_add(&entry->head, &slab->free); slab->num_free++; @@ -66,7 +66,7 @@ pb_slab_reclaim(struct pb_slabs *slabs, struct pb_slab_entry *entry) } if (slab->num_free >= slab->num_entries) { - LIST_DEL(&slab->head); + list_del(&slab->head); slabs->slab_free(slabs->priv, slab); } } @@ -124,7 +124,7 @@ pb_slab_alloc(struct pb_slabs *slabs, unsigned size, unsigned heap) if (!LIST_IS_EMPTY(&slab->free)) break; - LIST_DEL(&slab->head); + list_del(&slab->head); } if (LIST_IS_EMPTY(&group->slabs)) { @@ -145,7 +145,7 @@ pb_slab_alloc(struct pb_slabs *slabs, unsigned size, unsigned heap) } entry = LIST_ENTRY(struct pb_slab_entry, slab->free.next, head); - LIST_DEL(&entry->head); + list_del(&entry->head); slab->num_free--; mtx_unlock(&slabs->mutex); diff --git a/src/gallium/auxiliary/util/u_debug_memory.c b/src/gallium/auxiliary/util/u_debug_memory.c index 70f51144fa9..e468fd0b252 100644 --- a/src/gallium/auxiliary/util/u_debug_memory.c +++ b/src/gallium/auxiliary/util/u_debug_memory.c @@ -200,7 +200,7 @@ debug_free(const char *file, unsigned line, const char *function, memset(ptr, DEBUG_FREED_BYTE, hdr->size); #else mtx_lock(&list_mutex); - LIST_DEL(&hdr->head); + list_del(&hdr->head); mtx_unlock(&list_mutex); hdr->magic = 0; ftr->magic = 0; diff --git a/src/gallium/auxiliary/util/u_threaded_context.c b/src/gallium/auxiliary/util/u_threaded_context.c index a7885b6b591..086700c88bf 100644 --- a/src/gallium/auxiliary/util/u_threaded_context.c +++ b/src/gallium/auxiliary/util/u_threaded_context.c @@ -352,7 +352,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) - LIST_DEL(&tq->head_unflushed); + list_del(&tq->head_unflushed); pipe->destroy_query(pipe, payload->query); } @@ -432,7 +432,7 @@ tc_get_query_result(struct pipe_context *_pipe, tq->flushed = true; if (tq->head_unflushed.next) { /* This is safe because it can only happen after we sync'd. */ - LIST_DEL(&tq->head_unflushed); + list_del(&tq->head_unflushed); } } return success; @@ -1965,7 +1965,7 @@ tc_flush_queries(struct threaded_context *tc) { struct threaded_query *tq, *tmp; LIST_FOR_EACH_ENTRY_SAFE(tq, tmp, &tc->unflushed_queries, head_unflushed) { - LIST_DEL(&tq->head_unflushed); + list_del(&tq->head_unflushed); /* Memory release semantics: due to a possible race with * tc_get_query_result, we must ensure that the linked list changes diff --git a/src/gallium/drivers/nouveau/nouveau_fence.c b/src/gallium/drivers/nouveau/nouveau_fence.c index ab0a0349a02..d0c66c56128 100644 --- a/src/gallium/drivers/nouveau/nouveau_fence.c +++ b/src/gallium/drivers/nouveau/nouveau_fence.c @@ -50,7 +50,7 @@ nouveau_fence_trigger_work(struct nouveau_fence *fence) LIST_FOR_EACH_ENTRY_SAFE(work, tmp, &fence->work, list) { work->func(work->data); - LIST_DEL(&work->list); + list_del(&work->list); FREE(work); } } diff --git a/src/gallium/drivers/nouveau/nouveau_mm.c b/src/gallium/drivers/nouveau/nouveau_mm.c index 39430bc0282..f44b669e917 100644 --- a/src/gallium/drivers/nouveau/nouveau_mm.c +++ b/src/gallium/drivers/nouveau/nouveau_mm.c @@ -189,7 +189,7 @@ nouveau_mm_allocate(struct nouveau_mman *cache, } slab = LIST_ENTRY(struct mm_slab, bucket->free.next, head); - LIST_DEL(&slab->head); + list_del(&slab->head); list_add(&slab->head, &bucket->used); } @@ -202,7 +202,7 @@ nouveau_mm_allocate(struct nouveau_mman *cache, nouveau_bo_ref(slab->bo, bo); if (slab->free == 0) { - LIST_DEL(&slab->head); + list_del(&slab->head); list_add(&slab->head, &bucket->full); } @@ -222,11 +222,11 @@ nouveau_mm_free(struct nouveau_mm_allocation *alloc) mm_slab_free(slab, alloc->offset >> slab->order); if (slab->free == slab->count) { - LIST_DEL(&slab->head); + list_del(&slab->head); list_addtail(&slab->head, &bucket->free); } else if (slab->free == 1) { - LIST_DEL(&slab->head); + list_del(&slab->head); list_addtail(&slab->head, &bucket->used); } @@ -269,7 +269,7 @@ nouveau_mm_free_slabs(struct list_head *head) struct mm_slab *slab, *next; LIST_FOR_EACH_ENTRY_SAFE(slab, next, head, head) { - LIST_DEL(&slab->head); + list_del(&slab->head); nouveau_bo_ref(NULL, &slab->bo); FREE(slab); } diff --git a/src/gallium/drivers/nouveau/nv30/nv30_query.c b/src/gallium/drivers/nouveau/nv30/nv30_query.c index bb56c26af6a..75343a4612c 100644 --- a/src/gallium/drivers/nouveau/nv30/nv30_query.c +++ b/src/gallium/drivers/nouveau/nv30/nv30_query.c @@ -58,7 +58,7 @@ nv30_query_object_del(struct nv30_screen *screen, struct nv30_query_object **po) while (ntfy[3] & 0xff000000) { } nouveau_heap_free(&qo->hw); - LIST_DEL(&qo->list); + list_del(&qo->list); FREE(qo); } } diff --git a/src/gallium/drivers/r600/r600_asm.c b/src/gallium/drivers/r600/r600_asm.c index 4856abe75c1..6affa3d3a79 100644 --- a/src/gallium/drivers/r600/r600_asm.c +++ b/src/gallium/drivers/r600/r600_asm.c @@ -928,7 +928,7 @@ static int merge_inst_groups(struct r600_bytecode *bc, struct r600_bytecode_alu for (i = 0; i < max_slots; ++i) { slots[i] = result[i]; if (result[i]) { - LIST_DEL(&result[i]->list); + list_del(&result[i]->list); result[i]->last = 0; list_addtail(&result[i]->list, &bc->cf_last->alu); } diff --git a/src/gallium/drivers/r600/radeon_vce.c b/src/gallium/drivers/r600/radeon_vce.c index 89ac8b276a6..4051d73533d 100644 --- a/src/gallium/drivers/r600/radeon_vce.c +++ b/src/gallium/drivers/r600/radeon_vce.c @@ -131,12 +131,12 @@ static void sort_cpb(struct rvce_encoder *enc) } if (l1) { - LIST_DEL(&l1->list); + list_del(&l1->list); list_add(&l1->list, &enc->cpb_slots); } if (l0) { - LIST_DEL(&l0->list); + list_del(&l0->list); list_add(&l0->list, &enc->cpb_slots); } } @@ -341,7 +341,7 @@ static void rvce_end_frame(struct pipe_video_codec *encoder, slot->frame_num = enc->pic.frame_num; slot->pic_order_cnt = enc->pic.pic_order_cnt; if (!enc->pic.not_referenced) { - LIST_DEL(&slot->list); + list_del(&slot->list); list_add(&slot->list, &enc->cpb_slots); } } diff --git a/src/gallium/drivers/radeon/radeon_vce.c b/src/gallium/drivers/radeon/radeon_vce.c index 48012723b7e..84d3c1e2fa4 100644 --- a/src/gallium/drivers/radeon/radeon_vce.c +++ b/src/gallium/drivers/radeon/radeon_vce.c @@ -125,12 +125,12 @@ static void sort_cpb(struct rvce_encoder *enc) } if (l1) { - LIST_DEL(&l1->list); + list_del(&l1->list); list_add(&l1->list, &enc->cpb_slots); } if (l0) { - LIST_DEL(&l0->list); + list_del(&l0->list); list_add(&l0->list, &enc->cpb_slots); } } @@ -340,7 +340,7 @@ static void rvce_end_frame(struct pipe_video_codec *encoder, slot->frame_num = enc->pic.frame_num; slot->pic_order_cnt = enc->pic.pic_order_cnt; if (!enc->pic.not_referenced) { - LIST_DEL(&slot->list); + list_del(&slot->list); list_add(&slot->list, &enc->cpb_slots); } } diff --git a/src/gallium/drivers/radeonsi/gfx10_query.c b/src/gallium/drivers/radeonsi/gfx10_query.c index 0b76da8d95b..c5e668a3760 100644 --- a/src/gallium/drivers/radeonsi/gfx10_query.c +++ b/src/gallium/drivers/radeonsi/gfx10_query.c @@ -106,7 +106,7 @@ static void gfx10_release_query_buffers(struct si_context *sctx, if (qbuf->list.prev == &sctx->shader_query_buffers) continue; /* keep the oldest buffer for recycling */ - LIST_DEL(&qbuf->list); + list_del(&qbuf->list); si_resource_reference(&qbuf->buf, NULL); FREE(qbuf); } @@ -131,7 +131,7 @@ static bool gfx10_alloc_query_buffer(struct si_context *sctx) !si_rings_is_buffer_referenced(sctx, qbuf->buf->buf, RADEON_USAGE_READWRITE) && sctx->ws->buffer_wait(qbuf->buf->buf, 0, RADEON_USAGE_READWRITE)) { /* Can immediately re-use the oldest buffer */ - LIST_DEL(&qbuf->list); + list_del(&qbuf->list); } else { qbuf = NULL; } @@ -514,7 +514,7 @@ void gfx10_destroy_query(struct si_context *sctx) struct gfx10_sh_query_buffer *qbuf = list_first_entry(&sctx->shader_query_buffers, struct gfx10_sh_query_buffer, list); - LIST_DEL(&qbuf->list); + list_del(&qbuf->list); assert(!qbuf->refcount); si_resource_reference(&qbuf->buf, NULL); diff --git a/src/gallium/drivers/radeonsi/si_perfcounter.c b/src/gallium/drivers/radeonsi/si_perfcounter.c index 9d90ca6e53b..974ac430c53 100644 --- a/src/gallium/drivers/radeonsi/si_perfcounter.c +++ b/src/gallium/drivers/radeonsi/si_perfcounter.c @@ -855,7 +855,7 @@ static bool si_pc_query_end(struct si_context *ctx, struct si_query *squery) si_pc_query_suspend(ctx, squery); - LIST_DEL(&squery->active_list); + list_del(&squery->active_list); ctx->num_cs_dw_queries_suspend -= squery->num_cs_dw_suspend; return query->buffer.buf != NULL; diff --git a/src/gallium/drivers/svga/svga_resource_buffer_upload.c b/src/gallium/drivers/svga/svga_resource_buffer_upload.c index 9652f150d1f..2e9ca060059 100644 --- a/src/gallium/drivers/svga/svga_resource_buffer_upload.c +++ b/src/gallium/drivers/svga/svga_resource_buffer_upload.c @@ -410,7 +410,7 @@ svga_buffer_validate_host_surface(struct svga_context *svga, svga_screen_surface_destroy(svga_screen(sbuf->b.b.screen), &bufsurf->key, &bufsurf->handle); - LIST_DEL(&bufsurf->list); + list_del(&bufsurf->list); FREE(bufsurf); } } else { @@ -728,7 +728,7 @@ svga_buffer_upload_flush(struct svga_context *svga, struct svga_buffer *sbuf) sbuf->map.num_ranges = 0; assert(sbuf->head.prev && sbuf->head.next); - LIST_DEL(&sbuf->head); /* remove from svga->dirty_buffers list */ + list_del(&sbuf->head); /* remove from svga->dirty_buffers list */ #ifdef DEBUG sbuf->head.next = sbuf->head.prev = NULL; #endif diff --git a/src/gallium/drivers/svga/svga_screen_cache.c b/src/gallium/drivers/svga/svga_screen_cache.c index 6d77b55c4f4..90ca0912160 100644 --- a/src/gallium/drivers/svga/svga_screen_cache.c +++ b/src/gallium/drivers/svga/svga_screen_cache.c @@ -133,10 +133,10 @@ svga_screen_cache_lookup(struct svga_screen *svgascreen, entry->handle = NULL; /* Remove from hash table */ - LIST_DEL(&entry->bucket_head); + list_del(&entry->bucket_head); /* remove from LRU list */ - LIST_DEL(&entry->head); + list_del(&entry->head); /* Add the cache entry (but not the surface!) to the empty list */ list_add(&entry->head, &cache->empty); @@ -192,8 +192,8 @@ svga_screen_cache_shrink(struct svga_screen *svgascreen, assert(entry->handle); sws->surface_reference(sws, &entry->handle, NULL); - LIST_DEL(&entry->bucket_head); - LIST_DEL(&entry->head); + list_del(&entry->bucket_head); + list_del(&entry->head); list_add(&entry->head, &cache->empty); if (cache->total_size <= target_size) { @@ -264,7 +264,7 @@ svga_screen_cache_add(struct svga_screen *svgascreen, cache->empty.next, head); /* Remove from LRU list */ - LIST_DEL(&entry->head); + list_del(&entry->head); } else if (!LIST_IS_EMPTY(&cache->unused)) { /* free the last used buffer and reuse its entry */ @@ -278,10 +278,10 @@ svga_screen_cache_add(struct svga_screen *svgascreen, sws->surface_reference(sws, &entry->handle, NULL); /* Remove from hash table */ - LIST_DEL(&entry->bucket_head); + list_del(&entry->bucket_head); /* Remove from LRU list */ - LIST_DEL(&entry->head); + list_del(&entry->head); } if (entry) { @@ -338,7 +338,7 @@ svga_screen_cache_flush(struct svga_screen *svgascreen, if (sws->surface_is_flushed(sws, entry->handle)) { /* remove entry from the invalidated list */ - LIST_DEL(&entry->head); + list_del(&entry->head); sws->fence_reference(sws, &entry->fence, fence); @@ -364,7 +364,7 @@ svga_screen_cache_flush(struct svga_screen *svgascreen, if (sws->surface_is_flushed(sws, entry->handle)) { /* remove entry from the validated list */ - LIST_DEL(&entry->head); + list_del(&entry->head); /* It is now safe to invalidate the surface content. * It will be done using the current context. diff --git a/src/gallium/state_trackers/omx/bellagio/vid_dec_h265.c b/src/gallium/state_trackers/omx/bellagio/vid_dec_h265.c index 64326747ce6..c50be7804cb 100644 --- a/src/gallium/state_trackers/omx/bellagio/vid_dec_h265.c +++ b/src/gallium/state_trackers/omx/bellagio/vid_dec_h265.c @@ -668,7 +668,7 @@ static struct pipe_video_buffer *vid_dec_h265_Flush(vid_dec_PrivateType *priv, *timestamp = result->timestamp; --priv->codec_data.h265.dpb_num; - LIST_DEL(&result->list); + list_del(&result->list); FREE(result); return buf; diff --git a/src/gallium/state_trackers/omx/bellagio/vid_enc.c b/src/gallium/state_trackers/omx/bellagio/vid_enc.c index f1069344abb..6ec31378ea1 100644 --- a/src/gallium/state_trackers/omx/bellagio/vid_enc.c +++ b/src/gallium/state_trackers/omx/bellagio/vid_enc.c @@ -824,7 +824,7 @@ static void enc_ClearBframes(omx_base_PortType *port, struct input_buf_private * return; task = LIST_ENTRY(struct encode_task, priv->b_frames.prev, list); - LIST_DEL(&task->list); + list_del(&task->list); /* promote last from to P frame */ priv->ref_idx_l0 = priv->ref_idx_l1; @@ -912,7 +912,7 @@ static OMX_ERRORTYPE vid_enc_EncodeFrame(omx_base_PortType *port, OMX_BUFFERHEAD if (stacked_num == priv->stacked_frames_num) { struct encode_task *t; t = LIST_ENTRY(struct encode_task, priv->stacked_tasks.next, list); - LIST_DEL(&t->list); + list_del(&t->list); list_addtail(&t->list, &inp->tasks); } priv->ref_idx_l1 = priv->frame_num++; diff --git a/src/gallium/state_trackers/omx/tizonia/h264eprc.c b/src/gallium/state_trackers/omx/tizonia/h264eprc.c index b1fc2c73b46..877a22f6cfa 100644 --- a/src/gallium/state_trackers/omx/tizonia/h264eprc.c +++ b/src/gallium/state_trackers/omx/tizonia/h264eprc.c @@ -272,7 +272,7 @@ static void enc_ClearBframes(vid_enc_PrivateType * priv, struct input_buf_privat return; task = LIST_ENTRY(struct encode_task, priv->b_frames.prev, list); - LIST_DEL(&task->list); + list_del(&task->list); /* promote last from to P frame */ priv->ref_idx_l0 = priv->ref_idx_l1; @@ -366,7 +366,7 @@ static OMX_ERRORTYPE encode_frame(vid_enc_PrivateType * priv, OMX_BUFFERHEADERTY if (stacked_num == priv->stacked_frames_num) { struct encode_task *t; t = LIST_ENTRY(struct encode_task, priv->stacked_tasks.next, list); - LIST_DEL(&t->list); + list_del(&t->list); list_addtail(&t->list, &inp->tasks); } priv->ref_idx_l1 = priv->frame_num++; diff --git a/src/gallium/state_trackers/omx/vid_dec_h264_common.c b/src/gallium/state_trackers/omx/vid_dec_h264_common.c index 45406a58668..388852ba542 100644 --- a/src/gallium/state_trackers/omx/vid_dec_h264_common.c +++ b/src/gallium/state_trackers/omx/vid_dec_h264_common.c @@ -98,7 +98,7 @@ struct pipe_video_buffer *vid_dec_h264_Flush(vid_dec_PrivateType *priv, *timestamp = result->timestamp; --priv->codec_data.h264.dpb_num; - LIST_DEL(&result->list); + list_del(&result->list); FREE(result); return buf; diff --git a/src/gallium/state_trackers/omx/vid_enc_common.c b/src/gallium/state_trackers/omx/vid_enc_common.c index e79b92cbeb5..f4acb5cec6a 100644 --- a/src/gallium/state_trackers/omx/vid_enc_common.c +++ b/src/gallium/state_trackers/omx/vid_enc_common.c @@ -138,7 +138,7 @@ void vid_enc_BufferEncoded_common(vid_enc_PrivateType * priv, OMX_BUFFERHEADERTY #endif task = LIST_ENTRY(struct encode_task, inp->tasks.next, list); - LIST_DEL(&task->list); + list_del(&task->list); list_addtail(&task->list, &priv->used_tasks); if (!task->bitstream) @@ -184,7 +184,7 @@ struct encode_task *enc_NeedTask_common(vid_enc_PrivateType * priv, OMX_VIDEO_PO if (!LIST_IS_EMPTY(&priv->free_tasks)) { task = LIST_ENTRY(struct encode_task, priv->free_tasks.next, list); - LIST_DEL(&task->list); + list_del(&task->list); return task; } diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c b/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c index 537199c08fc..53d4356b1a1 100644 --- a/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c +++ b/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c @@ -176,7 +176,7 @@ void amdgpu_bo_destroy(struct pb_buffer *_buf) if (ws->debug_all_bos) { simple_mtx_lock(&ws->global_bo_list_lock); - LIST_DEL(&bo->u.real.global_list_item); + list_del(&bo->u.real.global_list_item); ws->num_buffers--; simple_mtx_unlock(&ws->global_bo_list_lock); } diff --git a/src/gallium/winsys/svga/drm/pb_buffer_simple_fenced.c b/src/gallium/winsys/svga/drm/pb_buffer_simple_fenced.c index d7a4834ba9b..4d8149d4422 100644 --- a/src/gallium/winsys/svga/drm/pb_buffer_simple_fenced.c +++ b/src/gallium/winsys/svga/drm/pb_buffer_simple_fenced.c @@ -214,7 +214,7 @@ fenced_buffer_destroy_locked(struct fenced_manager *fenced_mgr, assert(!fenced_buf->fence); assert(fenced_buf->head.prev); assert(fenced_buf->head.next); - LIST_DEL(&fenced_buf->head); + list_del(&fenced_buf->head); assert(fenced_mgr->num_unfenced); --fenced_mgr->num_unfenced; @@ -239,7 +239,7 @@ fenced_buffer_add_locked(struct fenced_manager *fenced_mgr, p_atomic_inc(&fenced_buf->base.reference.count); - LIST_DEL(&fenced_buf->head); + list_del(&fenced_buf->head); assert(fenced_mgr->num_unfenced); --fenced_mgr->num_unfenced; list_addtail(&fenced_buf->head, &fenced_mgr->fenced); @@ -268,7 +268,7 @@ fenced_buffer_remove_locked(struct fenced_manager *fenced_mgr, assert(fenced_buf->head.prev); assert(fenced_buf->head.next); - LIST_DEL(&fenced_buf->head); + list_del(&fenced_buf->head); assert(fenced_mgr->num_fenced); --fenced_mgr->num_fenced; diff --git a/src/gallium/winsys/virgl/common/virgl_resource_cache.c b/src/gallium/winsys/virgl/common/virgl_resource_cache.c index c78cfb4f9ef..21ec987ba4d 100644 --- a/src/gallium/winsys/virgl/common/virgl_resource_cache.c +++ b/src/gallium/winsys/virgl/common/virgl_resource_cache.c @@ -45,7 +45,7 @@ static void virgl_resource_cache_entry_release(struct virgl_resource_cache *cache, struct virgl_resource_cache_entry *entry) { - LIST_DEL(&entry->head); + list_del(&entry->head); cache->entry_release_func(entry, cache->user_data); } @@ -135,7 +135,7 @@ virgl_resource_cache_remove_compatible(struct virgl_resource_cache *cache, } if (compat_entry) - LIST_DEL(&compat_entry->head); + list_del(&compat_entry->head); return compat_entry; } diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c index 78d951d2a11..418024d33fd 100644 --- a/src/mesa/state_tracker/st_context.c +++ b/src/mesa/state_tracker/st_context.c @@ -361,7 +361,7 @@ free_zombie_sampler_views(struct st_context *st) LIST_FOR_EACH_ENTRY_SAFE(entry, next, &st->zombie_sampler_views.list.node, node) { - LIST_DEL(&entry->node); // remove this entry from the list + list_del(&entry->node); // remove this entry from the list assert(entry->view->context == st->pipe); pipe_sampler_view_reference(&entry->view, NULL); @@ -391,7 +391,7 @@ free_zombie_shaders(struct st_context *st) LIST_FOR_EACH_ENTRY_SAFE(entry, next, &st->zombie_shaders.list.node, node) { - LIST_DEL(&entry->node); // remove this entry from the list + list_del(&entry->node); // remove this entry from the list switch (entry->type) { case PIPE_SHADER_VERTEX: diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c index 226193f672c..0879f4912c2 100644 --- a/src/mesa/state_tracker/st_manager.c +++ b/src/mesa/state_tracker/st_manager.c @@ -640,7 +640,7 @@ st_framebuffers_purge(struct st_context *st) * deleted. */ if (!st_framebuffer_iface_lookup(smapi, stfbi)) { - LIST_DEL(&stfb->head); + list_del(&stfb->head); st_framebuffer_reference(&stfb, NULL); } } diff --git a/src/util/list.h b/src/util/list.h index 4074fb10b22..a4502285f8c 100644 --- a/src/util/list.h +++ b/src/util/list.h @@ -158,8 +158,6 @@ static inline void list_validate(const struct list_head *list) assert(node->next->prev == node && node->prev->next == node); } -#define LIST_DEL(__item) list_del(__item) - #define LIST_ENTRY(__type, __item, __field) \ ((__type *)(((char *)(__item)) - offsetof(__type, __field))) diff --git a/src/util/u_queue.c b/src/util/u_queue.c index 720c556f28a..97d674ce431 100644 --- a/src/util/u_queue.c +++ b/src/util/u_queue.c @@ -89,7 +89,7 @@ remove_from_atexit_list(struct util_queue *queue) mtx_lock(&exit_mutex); LIST_FOR_EACH_ENTRY_SAFE(iter, tmp, &queue_list, head) { if (iter == queue) { - LIST_DEL(&iter->head); + list_del(&iter->head); break; } }