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

Signed-off-by: Eric Engestrom <eric@igalia.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17772>
This commit is contained in:
Eric Engestrom 2022-07-27 16:49:18 +01:00 committed by Marge Bot
parent 2c67457e5e
commit 065691e299
1 changed files with 1 additions and 4 deletions

View File

@ -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);
}