[Mesa-dev] [RFC 1/3] util: move LIST_FIRST_ENTRY from nv30_query.c to list.h

Samuel Pitoiset samuel.pitoiset at gmail.com
Tue Jun 2 13:15:02 PDT 2015


Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
 src/gallium/drivers/nouveau/nv30/nv30_query.c | 3 ---
 src/util/list.h                               | 3 +++
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/gallium/drivers/nouveau/nv30/nv30_query.c b/src/gallium/drivers/nouveau/nv30/nv30_query.c
index 516ee83..80a9755 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(__type, __item, __field) \
-   LIST_ENTRY(__type, (__item)->next, __field)
-
 struct nv30_query_object {
    struct list_head list;
    struct nouveau_heap *hw;
diff --git a/src/util/list.h b/src/util/list.h
index 9460347..fb566f5 100644
--- a/src/util/list.h
+++ b/src/util/list.h
@@ -126,6 +126,9 @@ static inline void list_validate(struct list_head *list)
 #define LIST_ENTRY(__type, __item, __field)   \
     ((__type *)(((char *)(__item)) - offsetof(__type, __field)))
 
+#define LIST_FIRST_ENTRY(__type, __item, __field) \
+   LIST_ENTRY(__type, (__item)->next, __field)
+
 #define LIST_IS_EMPTY(__list)                   \
     ((__list)->next == (__list))
 
-- 
2.4.2



More information about the mesa-dev mailing list