Mesa (main): nouveau: use existing list_first_entry() macro instead of re-writing it

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jul 28 10:45:31 UTC 2022


Module: Mesa
Branch: main
Commit: 065691e299eeba4f01dc6574e560aef618bad22c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=065691e299eeba4f01dc6574e560aef618bad22c

Author: Eric Engestrom <eric at igalia.com>
Date:   Wed Jul 27 16:49:18 2022 +0100

nouveau: use existing list_first_entry() macro instead of re-writing it

Signed-off-by: Eric Engestrom <eric at igalia.com>
Acked-by: David Heidelberg <david.heidelberg at collabora.com>
Reviewed-by: Yonggang Luo <luoyonggang at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17772>

---

 src/gallium/drivers/nouveau/nv30/nv30_query.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/gallium/drivers/nouveau/nv30/nv30_query.c b/src/gallium/drivers/nouveau/nv30/nv30_query.c
index 6a4665e5f51..1335cb99b12 100644
--- a/src/gallium/drivers/nouveau/nv30/nv30_query.c
+++ b/src/gallium/drivers/nouveau/nv30/nv30_query.c
@@ -28,9 +28,6 @@
 #include "nv30/nv30_screen.h"
 #include "nv30/nv30_context.h"
 
-#define LIST_FIRST_ENTRY(__item, __type, __field) \
-   list_entry((__item)->next, __type, __field)
-
 struct nv30_query_object {
    struct list_head list;
    struct nouveau_heap *hw;
@@ -76,7 +73,7 @@ nv30_query_object_new(struct nv30_screen *screen)
     * spin waiting for one to become free
     */
    while (nouveau_heap_alloc(screen->query_heap, 32, NULL, &qo->hw)) {
-      oq = LIST_FIRST_ENTRY(&screen->queries, struct nv30_query_object, list);
+      oq = list_first_entry(&screen->queries, struct nv30_query_object, list);
       nv30_query_object_del(screen, &oq);
    }
 



More information about the mesa-commit mailing list