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:
parent
2c67457e5e
commit
065691e299
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue