[PATCH v2 8/9] qemu: Remove empty functions

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

 



After previous cleanup, there are some functions that do nothing:

  qemuConnectDomainXMLToNativePrepareHostHostdev()
  qemuConnectDomainXMLToNativePrepareHost()
  qemuProcessPrepareHostHostdev()
  qemuProcessPrepareHostHostdevs()

Remove them.

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
 src/qemu/qemu_driver.c  | 26 --------------------------
 src/qemu/qemu_hotplug.c |  3 ---
 src/qemu/qemu_process.c | 27 ---------------------------
 src/qemu/qemu_process.h |  3 ---
 4 files changed, 59 deletions(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index d6f9d0796a..fdd5fb0826 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -6165,29 +6165,6 @@ static char
 }
 
 
-static int
-qemuConnectDomainXMLToNativePrepareHostHostdev(virDomainHostdevDef *hostdev G_GNUC_UNUSED)
-{
-    return 0;
-}
-
-
-static int
-qemuConnectDomainXMLToNativePrepareHost(virDomainObj *vm)
-{
-    size_t i;
-
-    for (i = 0; i < vm->def->nhostdevs; i++) {
-        virDomainHostdevDef *hostdev = vm->def->hostdevs[i];
-
-        if (qemuConnectDomainXMLToNativePrepareHostHostdev(hostdev) < 0)
-            return -1;
-    }
-
-    return 0;
-}
-
-
 static char *qemuConnectDomainXMLToNative(virConnectPtr conn,
                                           const char *format,
                                           const char *xmlData,
@@ -6244,9 +6221,6 @@ static char *qemuConnectDomainXMLToNative(virConnectPtr conn,
                                            VIR_QEMU_PROCESS_START_COLD) < 0)
         return NULL;
 
-    if (qemuConnectDomainXMLToNativePrepareHost(vm) < 0)
-        return NULL;
-
     if (!(cmd = qemuProcessCreatePretendCmdBuild(vm, NULL)))
         return NULL;
 
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 566aa1f7df..bf9d16e82b 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -2457,9 +2457,6 @@ qemuDomainAttachHostSCSIDevice(virQEMUDriver *driver,
 
     qemuAssignDeviceHostdevAlias(vm->def, &hostdev->info->alias, -1);
 
-    if (qemuProcessPrepareHostHostdev(hostdev) < 0)
-        goto cleanup;
-
     if (!(data = qemuBuildHostdevSCSIAttachPrepare(hostdev, &backendalias,
                                                    priv->qemuCaps)))
         goto cleanup;
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 0bc19479d4..75a1d88cd7 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -6509,29 +6509,6 @@ qemuProcessPrepareDomainHostdevs(virDomainObj *vm,
 }
 
 
-int
-qemuProcessPrepareHostHostdev(virDomainHostdevDef *hostdev G_GNUC_UNUSED)
-{
-    return 0;
-}
-
-
-static int
-qemuProcessPrepareHostHostdevs(virDomainObj *vm)
-{
-    size_t i;
-
-    for (i = 0; i < vm->def->nhostdevs; i++) {
-        virDomainHostdevDef *hostdev = vm->def->hostdevs[i];
-
-        if (qemuProcessPrepareHostHostdev(hostdev) < 0)
-            return -1;
-    }
-
-    return 0;
-}
-
-
 /**
  * qemuProcessRebootAllowed:
  * @def: domain definition
@@ -7233,10 +7210,6 @@ qemuProcessPrepareHost(virQEMUDriver *driver,
     if (qemuProcessPrepareHostStorage(driver, vm, flags) < 0)
         return -1;
 
-    VIR_DEBUG("Preparing hostdevs (host-side)");
-    if (qemuProcessPrepareHostHostdevs(vm) < 0)
-        return -1;
-
     VIR_DEBUG("Preparing external devices");
     if (qemuExtDevicesPrepareHost(driver, vm) < 0)
         return -1;
diff --git a/src/qemu/qemu_process.h b/src/qemu/qemu_process.h
index b171f0464c..5d1b24a038 100644
--- a/src/qemu/qemu_process.h
+++ b/src/qemu/qemu_process.h
@@ -111,9 +111,6 @@ int qemuProcessPrepareDomain(virQEMUDriver *driver,
 
 int qemuProcessOpenVhostVsock(virDomainVsockDef *vsock);
 
-int qemuProcessPrepareHostHostdev(virDomainHostdevDef *hostdev);
-
-
 int qemuProcessPrepareHostBackendChardevHotplug(virDomainObj *vm,
                                                 virDomainDeviceDef *dev)
     G_NO_INLINE;
-- 
2.39.2




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux