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

[Xen-devel] [PATCH 2/7] p2m_size is unnecessarily passed as a parameter when it's available as a global variable.



p2m_size is unnecessarily passed as a parameter when it's available as a global 
variable.
it's leading to confusion to which one is used, hence removing the parameter
overshadowing the global.

---
 tools/libxc/xc_domain_save.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/tools/libxc/xc_domain_save.c b/tools/libxc/xc_domain_save.c
index 697d93c..eb5d48d 100644
--- a/tools/libxc/xc_domain_save.c
+++ b/tools/libxc/xc_domain_save.c
@@ -401,7 +401,7 @@ static int print_stats(int xc_handle, uint32_t domid, int 
pages_sent,
 }
 
 
-static int analysis_phase(int xc_handle, uint32_t domid, int p2m_size,
+static int analysis_phase(int xc_handle, uint32_t domid,
                           unsigned long *arr, int runs)
 {
     long long start, now;
@@ -673,7 +673,6 @@ err0:
 static xen_pfn_t *map_and_save_p2m_table(int xc_handle, 
                                          int io_fd, 
                                          uint32_t dom,
-                                         unsigned long p2m_size,
                                          shared_info_any_t *live_shinfo)
 {
     vcpu_guest_context_any_t ctxt;
@@ -1027,7 +1026,7 @@ int xc_domain_save(int xc_handle, int io_fd, uint32_t 
dom, uint32_t max_iters,
         }
     }
 
-    analysis_phase(xc_handle, dom, p2m_size, to_skip, 0);
+    analysis_phase(xc_handle, dom, to_skip, 0);
 
     pfn_type   = xg_memalign(PAGE_SIZE, ROUNDUP(
                               MAX_BATCH_SIZE * sizeof(*pfn_type), PAGE_SHIFT));
@@ -1066,8 +1065,7 @@ int xc_domain_save(int xc_handle, int io_fd, uint32_t 
dom, uint32_t max_iters,
         int err = 0;
 
         /* Map the P2M table, and write the list of P2M frames */
-        live_p2m = map_and_save_p2m_table(xc_handle, io_fd, dom, 
-                                          p2m_size, live_shinfo);
+        live_p2m = map_and_save_p2m_table(xc_handle, io_fd, dom, live_shinfo);
         if ( live_p2m == NULL )
         {
             ERROR("Failed to map/save the p2m frame list");
-- 
1.6.5.2


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

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