util: remove LIST_IS_EMPTY macro
[mesa.git] / src / gallium / drivers / nouveau / nouveau_mm.c
index 39430bc0282149351638b42a6a788710b561f0c2..3ba6ea95d1d79b86eb5acf6aed29944cdfc393c0 100644 (file)
@@ -181,15 +181,15 @@ nouveau_mm_allocate(struct nouveau_mman *cache,
       return NULL;
    }
 
-   if (!LIST_IS_EMPTY(&bucket->used)) {
+   if (!list_is_empty(&bucket->used)) {
       slab = LIST_ENTRY(struct mm_slab, bucket->used.next, head);
    } else {
-      if (LIST_IS_EMPTY(&bucket->free)) {
+      if (list_is_empty(&bucket->free)) {
          mm_slab_new(cache, MAX2(mm_get_order(size), MM_MIN_ORDER));
       }
       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);
    }
@@ -284,8 +284,8 @@ nouveau_mm_destroy(struct nouveau_mman *cache)
       return;
 
    for (i = 0; i < MM_NUM_BUCKETS; ++i) {
-      if (!LIST_IS_EMPTY(&cache->bucket[i].used) ||
-          !LIST_IS_EMPTY(&cache->bucket[i].full))
+      if (!list_is_empty(&cache->bucket[i].used) ||
+          !list_is_empty(&cache->bucket[i].full))
          debug_printf("WARNING: destroying GPU memory cache "
                       "with some buffers still in use\n");