[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-3.4-testing] Replace magic number for NULL (~0) with PAGE_LIST_NULL
# HG changeset patch # User Keir Fraser <keir.fraser@xxxxxxxxxx> # Date 1254409843 -3600 # Node ID 9833101024c24f431ffc2466ed7d7effc8582c24 # Parent d4a0b5f420beb9d70a12dc4a7e132c40f992a777 Replace magic number for NULL (~0) with PAGE_LIST_NULL ...in the page_list_* functions. Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx> xen-unstable changeset: 20199:848193b1ec26 xen-unstable date: Tue Sep 15 09:19:23 2009 +0100 --- xen/include/xen/mm.h | 18 ++++++++++-------- 1 files changed, 10 insertions(+), 8 deletions(-) diff -r d4a0b5f420be -r 9833101024c2 xen/include/xen/mm.h --- a/xen/include/xen/mm.h Thu Oct 01 16:09:02 2009 +0100 +++ b/xen/include/xen/mm.h Thu Oct 01 16:10:43 2009 +0100 @@ -100,11 +100,13 @@ struct page_list_head /* These must only have instances in struct page_info. */ # define page_list_entry +#define PAGE_LIST_NULL (~0) + # define PAGE_LIST_HEAD_INIT(name) { NULL, NULL } # define PAGE_LIST_HEAD(name) \ struct page_list_head name = PAGE_LIST_HEAD_INIT(name) # define INIT_PAGE_LIST_HEAD(head) ((head)->tail = (head)->next = NULL) -# define INIT_PAGE_LIST_ENTRY(ent) ((ent)->prev = (ent)->next = ~0) +# define INIT_PAGE_LIST_ENTRY(ent) ((ent)->prev = (ent)->next = PAGE_LIST_NULL) static inline int page_list_empty(const struct page_list_head *head) @@ -139,15 +141,15 @@ page_list_add(struct page_info *page, st else { head->tail = page; - page->list.next = ~0; - } - page->list.prev = ~0; + page->list.next = PAGE_LIST_NULL; + } + page->list.prev = PAGE_LIST_NULL; head->next = page; } static inline void page_list_add_tail(struct page_info *page, struct page_list_head *head) { - page->list.next = ~0; + page->list.next = PAGE_LIST_NULL; if ( head->next ) { page->list.prev = page_to_mfn(head->tail); @@ -155,7 +157,7 @@ page_list_add_tail(struct page_info *pag } else { - page->list.prev = ~0; + page->list.prev = PAGE_LIST_NULL; head->next = page; } head->tail = page; @@ -168,7 +170,7 @@ __page_list_del_head(struct page_info *p { if ( head->tail != page ) { - next->list.prev = ~0; + next->list.prev = PAGE_LIST_NULL; head->next = next; } else @@ -178,7 +180,7 @@ __page_list_del_head(struct page_info *p if ( head->tail == page ) { - prev->list.next = ~0; + prev->list.next = PAGE_LIST_NULL; head->tail = prev; return 1; } _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |