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

[Xen-changelog] [xen-unstable] libxl: abolish useless `start' parameter to libxl__add_*


  • To: xen-changelog@xxxxxxxxxxxxxxxxxxx
  • From: Xen patchbot-unstable <patchbot@xxxxxxx>
  • Date: Tue, 07 Aug 2012 20:33:15 +0000
  • Delivery-date: Tue, 07 Aug 2012 20:33:26 +0000
  • List-id: "Change log for Mercurial \(receive only\)" <xen-changelog.lists.xen.org>

# HG changeset patch
# User Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
# Date 1343984051 -3600
# Node ID ee32ae1631266f0f6cce3d8c95ba15a68ec258a4
# Parent  8897bc3d8a3029d6a6e6cba9dfcdc08f94016bd7
libxl: abolish useless `start' parameter to libxl__add_*

0 is always passed for this parameter and the code doesn't, actually,
use it, now.

Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Committed-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---


diff -r 8897bc3d8a30 -r ee32ae163126 tools/libxl/libxl_create.c
--- a/tools/libxl/libxl_create.c        Fri Aug 03 09:54:10 2012 +0100
+++ b/tools/libxl/libxl_create.c        Fri Aug 03 09:54:11 2012 +0100
@@ -911,7 +911,7 @@ static void domcreate_rebuild_done(libxl
 
     libxl__multidev_begin(ao, &dcs->aodevs);
     dcs->aodevs.callback = domcreate_launch_dm;
-    libxl__add_disks(egc, ao, domid, 0, d_config, &dcs->aodevs);
+    libxl__add_disks(egc, ao, domid, d_config, &dcs->aodevs);
     libxl__multidev_prepared(egc, &dcs->aodevs, 0);
 
     return;
@@ -1041,7 +1041,7 @@ static void domcreate_devmodel_started(l
         /* Attach nics */
         libxl__multidev_begin(ao, &dcs->aodevs);
         dcs->aodevs.callback = domcreate_attach_pci;
-        libxl__add_nics(egc, ao, domid, 0, d_config, &dcs->aodevs);
+        libxl__add_nics(egc, ao, domid, d_config, &dcs->aodevs);
         libxl__multidev_prepared(egc, &dcs->aodevs, 0);
         return;
     }
diff -r 8897bc3d8a30 -r ee32ae163126 tools/libxl/libxl_device.c
--- a/tools/libxl/libxl_device.c        Fri Aug 03 09:54:10 2012 +0100
+++ b/tools/libxl/libxl_device.c        Fri Aug 03 09:54:11 2012 +0100
@@ -485,15 +485,14 @@ void libxl__multidev_prepared(libxl__egc
 
 #define DEFINE_DEVICES_ADD(type)                                        \
     void libxl__add_##type##s(libxl__egc *egc, libxl__ao *ao, uint32_t domid, \
-                              int start, libxl_domain_config *d_config, \
+                              libxl_domain_config *d_config,            \
                               libxl__ao_devices *aodevs)                \
     {                                                                   \
         AO_GC;                                                          \
         int i;                                                          \
-        int end = start + d_config->num_##type##s;                      \
-        for (i = start; i < end; i++) {                                 \
+        for (i = 0; i < d_config->num_##type##s; i++) {                 \
             libxl__ao_device *aodev = libxl__multidev_prepare(aodevs);  \
-            libxl__device_##type##_add(egc, domid, 
&d_config->type##s[i-start], \
+            libxl__device_##type##_add(egc, domid, &d_config->type##s[i], \
                                        aodev);                          \
         }                                                               \
     }
diff -r 8897bc3d8a30 -r ee32ae163126 tools/libxl/libxl_dm.c
--- a/tools/libxl/libxl_dm.c    Fri Aug 03 09:54:10 2012 +0100
+++ b/tools/libxl/libxl_dm.c    Fri Aug 03 09:54:11 2012 +0100
@@ -858,7 +858,7 @@ retry_transaction:
 
     libxl__multidev_begin(ao, &sdss->aodevs);
     sdss->aodevs.callback = spawn_stub_launch_dm;
-    libxl__add_disks(egc, ao, dm_domid, 0, dm_config, &sdss->aodevs);
+    libxl__add_disks(egc, ao, dm_domid, dm_config, &sdss->aodevs);
     libxl__multidev_prepared(egc, &sdss->aodevs, 0);
 
     free(args);
@@ -984,7 +984,7 @@ static void spawn_stubdom_pvqemu_cb(libx
     if (d_config->num_nics > 0) {
         libxl__multidev_begin(ao, &sdss->aodevs);
         sdss->aodevs.callback = stubdom_pvqemu_cb;
-        libxl__add_nics(egc, ao, dm_domid, 0, d_config, &sdss->aodevs);
+        libxl__add_nics(egc, ao, dm_domid, d_config, &sdss->aodevs);
         libxl__multidev_prepared(egc, &sdss->aodevs, 0);
         return;
     }
diff -r 8897bc3d8a30 -r ee32ae163126 tools/libxl/libxl_internal.h
--- a/tools/libxl/libxl_internal.h      Fri Aug 03 09:54:10 2012 +0100
+++ b/tools/libxl/libxl_internal.h      Fri Aug 03 09:54:11 2012 +0100
@@ -2388,19 +2388,17 @@ _hidden void libxl__devices_destroy(libx
 /* Helper function to add a bunch of disks. This should be used when
  * the caller is inside an async op. "devices" will NOT be prepared by
  * this function, so the caller must make sure to call
- * libxl__multidev_begin before calling this function. The start
- * parameter contains the position inside the aodevs array that should
- * be used to store the state of this devices.
+ * libxl__multidev_begin before calling this function.
  *
  * The "callback" will be called for each device, and the user is responsible
  * for calling libxl__ao_device_check_last on the callback.
  */
 _hidden void libxl__add_disks(libxl__egc *egc, libxl__ao *ao, uint32_t domid,
-                              int start, libxl_domain_config *d_config,
+                              libxl_domain_config *d_config,
                               libxl__ao_devices *aodevs);
 
 _hidden void libxl__add_nics(libxl__egc *egc, libxl__ao *ao, uint32_t domid,
-                             int start, libxl_domain_config *d_config,
+                             libxl_domain_config *d_config,
                              libxl__ao_devices *aodevs);
 
 /*----- device model creation -----*/

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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