[PATCH 30/33] qemu: Remove return value from qemuMonitorDomainRdmaGidStatusChangedCallback

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

 



Change the callback prototype and fix the callback registered in the
process code.

It is also impossible for @info to be non-NULL in the cleanup section so
the cleanup can be completely removed.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/qemu/qemu_monitor.h | 14 +++++++-------
 src/qemu/qemu_process.c |  8 +-------
 2 files changed, 8 insertions(+), 14 deletions(-)

diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h
index caec6a424c..071a40de44 100644
--- a/src/qemu/qemu_monitor.h
+++ b/src/qemu/qemu_monitor.h
@@ -316,13 +316,13 @@ typedef void (*qemuMonitorDomainPRManagerStatusChangedCallback)(qemuMonitor *mon
                                                                 bool connected,
                                                                 void *opaque);

-typedef int (*qemuMonitorDomainRdmaGidStatusChangedCallback)(qemuMonitor *mon,
-                                                             virDomainObj *vm,
-                                                             const char *netdev,
-                                                             bool gid_status,
-                                                             unsigned long long subnet_prefix,
-                                                             unsigned long long interface_id,
-                                                             void *opaque);
+typedef void (*qemuMonitorDomainRdmaGidStatusChangedCallback)(qemuMonitor *mon,
+                                                              virDomainObj *vm,
+                                                              const char *netdev,
+                                                              bool gid_status,
+                                                              unsigned long long subnet_prefix,
+                                                              unsigned long long interface_id,
+                                                              void *opaque);

 typedef int (*qemuMonitorDomainGuestCrashloadedCallback)(qemuMonitor *mon,
                                                          virDomainObj *vm,
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 1c9327e179..c31dbb5513 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -1751,7 +1751,7 @@ qemuProcessHandlePRManagerStatusChanged(qemuMonitor *mon G_GNUC_UNUSED,
 }


-static int
+static void
 qemuProcessHandleRdmaGidStatusChanged(qemuMonitor *mon G_GNUC_UNUSED,
                                       virDomainObj *vm,
                                       const char *netdev,
@@ -1763,7 +1763,6 @@ qemuProcessHandleRdmaGidStatusChanged(qemuMonitor *mon G_GNUC_UNUSED,
     virQEMUDriver *driver = opaque;
     struct qemuProcessEvent *processEvent = NULL;
     qemuMonitorRdmaGidStatus *info = NULL;
-    int ret = -1;

     virObjectLock(vm);

@@ -1787,14 +1786,9 @@ qemuProcessHandleRdmaGidStatusChanged(qemuMonitor *mon G_GNUC_UNUSED,
     if (virThreadPoolSendJob(driver->workerPool, 0, processEvent) < 0) {
         qemuProcessEventFree(processEvent);
         virObjectUnref(vm);
-        goto cleanup;
     }

-    ret = 0;
- cleanup:
-    qemuMonitorEventRdmaGidStatusFree(info);
     virObjectUnlock(vm);
-    return ret;
 }


-- 
2.31.1




[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