Skip to contentSkip to conversation

x86/mm: Code style fixes in mem_sharing.c

PATCH Applied Andres Lagar-Cavilla 2 participants 2 messages Jan 9, 2012 – Jan 12, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/mm: Code style fixes in mem_sharing.c

 xen/arch/x86/mm.c             |   6 +-
 xen/arch/x86/mm/mem_sharing.c |  88 +++++++++++++++++++++---------------------
 2 files changed, 48 insertions(+), 46 deletions(-)

No functional changes, only code style issues.

One small diff in mem_sharing_gref_to_gfn() looks like a logic change, but it's not. The flow was confusing, so it's been clarified.

This version does not differ from the last iteration.

xen/arch/x86/mm.c +3 -3
diff -r ee6a41ae9dcb -r 2ed49e894084 xen/arch/x86/mm.c
@@ -4316,9 +4316,9 @@ int page_make_sharable(struct domain *d,
         return -EEXIST;
     }
 
-    /* Check if the ref count is 2. The first from PGT_allocated, and
+    /* Check if the ref count is 2. The first from PGC_allocated, and
      * the second from get_page_and_type at the top of this function */
-    if(page->count_info != (PGC_allocated | (2 + expected_refcnt)))
+    if ( page->count_info != (PGC_allocated | (2 + expected_refcnt)) )
     {
         /* Return type count back to zero */
         put_page_and_type(page);
@@ -4335,7 +4335,7 @@ int page_make_sharable(struct domain *d,
 
 int page_make_private(struct domain *d, struct page_info *page)
 {
-    if(!get_page(page, dom_cow))
+    if ( !get_page(page, dom_cow) )
         return -EINVAL;
     
     spin_lock(&d->page_alloc_lock);
xen/arch/x86/mm/mem_sharing.c +45 -43

256 lines not on this page · raw message