diff mbox

qemu: process: Remove unused qemuCaps

Message ID 6acc865c1ca03441606478105bf6d5cac6e4933b.1499722639.git.crobinso@redhat.com
State Accepted
Commit ccb7c7b253ed330e037f8231a7d5efd58749c74a
Headers show

Commit Message

Cole Robinson July 10, 2017, 9:37 p.m. UTC
After 405c0f07f5 qemuCaps is unused here, remove it from the call
stack

Signed-off-by: Cole Robinson <crobinso@redhat.com>

---
 src/qemu/qemu_process.c | 27 ++++++++-------------------
 1 file changed, 8 insertions(+), 19 deletions(-)

-- 
2.13.0

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Comments

Andrea Bolognani July 11, 2017, 6:37 a.m. UTC | #1
On Mon, 2017-07-10 at 17:37 -0400, Cole Robinson wrote:
> After 405c0f07f5

The commit that changed qemuProcessLookupPTYs() is actually
426dc5eb28bade109bf27bdd10d7305a040b4a3e, isn't it?

> qemuCaps is unused here, remove it from the call
> stack

@def has become ATTRIBUTE_UNUSED as of that commit as well,
so you should mention both.


Reviewed-by: Andrea Bolognani <abologna@redhat.com>

-- 
Andrea Bolognani / Red Hat / Virtualization

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Cole Robinson July 12, 2017, 1:46 p.m. UTC | #2
On 07/11/2017 02:37 AM, Andrea Bolognani wrote:
> On Mon, 2017-07-10 at 17:37 -0400, Cole Robinson wrote:

>> After 405c0f07f5

> 

> The commit that changed qemuProcessLookupPTYs() is actually

> 426dc5eb28bade109bf27bdd10d7305a040b4a3e, isn't it?

> 

>> qemuCaps is unused here, remove it from the call

>> stack

> 

> @def has become ATTRIBUTE_UNUSED as of that commit as well,

> so you should mention both.

> 


Fixed and pushed

Thanks,
Cole

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
diff mbox

Patch

diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index e6522a294..34974c6e5 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -1877,9 +1877,7 @@  qemuProcessMonitorReportLogError(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
 
 
 static int
-qemuProcessLookupPTYs(virDomainDefPtr def ATTRIBUTE_UNUSED,
-                      virQEMUCapsPtr qemuCaps ATTRIBUTE_UNUSED,
-                      virDomainChrDefPtr *devices,
+qemuProcessLookupPTYs(virDomainChrDefPtr *devices,
                       int count,
                       virHashTablePtr info)
 {
@@ -1927,24 +1925,18 @@  qemuProcessLookupPTYs(virDomainDefPtr def ATTRIBUTE_UNUSED,
 
 static int
 qemuProcessFindCharDevicePTYsMonitor(virDomainObjPtr vm,
-                                     virQEMUCapsPtr qemuCaps,
                                      virHashTablePtr info)
 {
     size_t i = 0;
 
-    if (qemuProcessLookupPTYs(vm->def, qemuCaps,
-                              vm->def->serials, vm->def->nserials,
-                              info) < 0)
+    if (qemuProcessLookupPTYs(vm->def->serials, vm->def->nserials, info) < 0)
         return -1;
 
-    if (qemuProcessLookupPTYs(vm->def, qemuCaps,
-                              vm->def->parallels, vm->def->nparallels,
+    if (qemuProcessLookupPTYs(vm->def->parallels, vm->def->nparallels,
                               info) < 0)
         return -1;
 
-    if (qemuProcessLookupPTYs(vm->def, qemuCaps,
-                              vm->def->channels, vm->def->nchannels,
-                              info) < 0)
+    if (qemuProcessLookupPTYs(vm->def->channels, vm->def->nchannels, info) < 0)
         return -1;
     /* For historical reasons, console[0] can be just an alias
      * for serial[0]. That's why we need to update it as well. */
@@ -1962,8 +1954,7 @@  qemuProcessFindCharDevicePTYsMonitor(virDomainObjPtr vm,
         }
     }
 
-    if (qemuProcessLookupPTYs(vm->def, qemuCaps,
-                              vm->def->consoles + i, vm->def->nconsoles - i,
+    if (qemuProcessLookupPTYs(vm->def->consoles + i, vm->def->nconsoles - i,
                               info) < 0)
         return -1;
 
@@ -2111,7 +2102,6 @@  static int
 qemuProcessWaitForMonitor(virQEMUDriverPtr driver,
                           virDomainObjPtr vm,
                           int asyncJob,
-                          virQEMUCapsPtr qemuCaps,
                           qemuDomainLogContextPtr logCtxt)
 {
     int ret = -1;
@@ -2135,8 +2125,7 @@  qemuProcessWaitForMonitor(virQEMUDriverPtr driver,
         ret = -1;
 
     if (ret == 0) {
-        if ((ret = qemuProcessFindCharDevicePTYsMonitor(vm, qemuCaps,
-                                                        info)) < 0)
+        if ((ret = qemuProcessFindCharDevicePTYsMonitor(vm, info)) < 0)
             goto cleanup;
 
         if ((ret = qemuProcessRefreshChannelVirtioState(driver, vm, info,
@@ -5870,7 +5859,7 @@  qemuProcessLaunch(virConnectPtr conn,
         goto cleanup;
 
     VIR_DEBUG("Waiting for monitor to show up");
-    if (qemuProcessWaitForMonitor(driver, vm, asyncJob, priv->qemuCaps, logCtxt) < 0)
+    if (qemuProcessWaitForMonitor(driver, vm, asyncJob, logCtxt) < 0)
         goto cleanup;
 
     if (qemuConnectAgent(driver, vm) < 0)
@@ -6724,7 +6713,7 @@  int qemuProcessAttach(virConnectPtr conn ATTRIBUTE_UNUSED,
     qemuDomainObjTaint(driver, vm, VIR_DOMAIN_TAINT_EXTERNAL_LAUNCH, logCtxt);
 
     VIR_DEBUG("Waiting for monitor to show up");
-    if (qemuProcessWaitForMonitor(driver, vm, QEMU_ASYNC_JOB_NONE, priv->qemuCaps, NULL) < 0)
+    if (qemuProcessWaitForMonitor(driver, vm, QEMU_ASYNC_JOB_NONE, NULL) < 0)
         goto error;
 
     if (qemuConnectAgent(driver, vm) < 0)