[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [RFC PATCH v2 02/22] Use linked list accessors for page_list helper function



From: Vijaya Kumar K <Vijaya.Kumar@xxxxxxxxxxxxxxxxxx>

Use newly introduced linked list helper functions in
page_list* functions

Signed-off-by: Vijaya Kumar K <Vijaya.Kumar@xxxxxxxxxxxxxxxxxx>
CC: Jan Beulich <JBeulich@xxxxxxxx>
---
 xen/include/xen/mm.h |   10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/xen/include/xen/mm.h b/xen/include/xen/mm.h
index 6ea8b8c..33da984 100644
--- a/xen/include/xen/mm.h
+++ b/xen/include/xen/mm.h
@@ -336,14 +336,12 @@ page_list_splice(struct page_list_head *list, struct 
page_list_head *head)
 # define INIT_PAGE_LIST_HEAD             INIT_LIST_HEAD
 # define INIT_PAGE_LIST_ENTRY            INIT_LIST_HEAD
 # define page_list_empty                 list_empty
-# define page_list_first(hd)             list_entry((hd)->next, \
+# define page_list_first(hd)             list_first_entry(hd, \
                                                     struct page_info, list)
-# define page_list_last(hd)              list_entry((hd)->prev, \
-                                                    struct page_info, list)
-# define page_list_next(pg, hd)          list_entry((pg)->list.next, \
-                                                    struct page_info, list)
-# define page_list_prev(pg, hd)          list_entry((pg)->list.prev, \
+# define page_list_last(hd)              list_last_entry(hd, \
                                                     struct page_info, list)
+# define page_list_next(pg, hd)          list_next_entry(pg, list)
+# define page_list_prev(pg, hd)          list_prev_entry(pg, list)
 # define page_list_add(pg, hd)           list_add(&(pg)->list, hd)
 # define page_list_add_tail(pg, hd)      list_add_tail(&(pg)->list, hd)
 # define page_list_del(pg, hd)           list_del(&(pg)->list)
-- 
1.7.9.5


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.