From patchwork Mon Jul 10 21:37:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 107332 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp3977514qge; Mon, 10 Jul 2017 14:38:06 -0700 (PDT) X-Received: by 10.55.204.157 with SMTP id n29mr6181118qkl.135.1499722686654; Mon, 10 Jul 2017 14:38:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1499722686; cv=none; d=google.com; s=arc-20160816; b=m3IRWw9Rwj4gTU4Et6ZMcRt1znB6eXxV+F/oYqYcVivgCf9ywLyZ8Al3XzTx0ZuZFw nSWRNiGGFMw/tnheL78PayICKceCVey0RLLY+f4ul1QW0pZTi698t8EGZO0f4neRYXyk pA9T9e3UUl1mBTvtlR9/dn0Nec0yUz5KKPS9Q6NUY0KkR3bOrih9RPyfebmyl3HOrYDA 32xbHNItWCkkDWmGkc/pUgUErjD3dhpB8ISq3lGzv+iziMFcw8YIC+Jq41Q67ZHQM4Oy O1HygxjaUiJaIK3dpoQcgEJoPMnZO7LOj5REAwF/iyGDWXATovSRgheZyocM8esw3dT7 DQAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:message-id:date:to:from:delivered-to :dkim-filter:dmarc-filter:arc-authentication-results; bh=9mZ/2I93VTyYe8MWeHT3kQN+9mAWccg5B3vblqaZI5Q=; b=YqNH1RczDZo6ke1kzMdTW+HV7r/jiFNaUkxj7uBKc6aS0hzs743Q6gTd5z2Emz/Nhs GXgj7mLnFxuV9/mq6Jz/LroSAq1zq6eoQy+dCcyaqqwLWd/95+FzXG+kK68M/0bfUsnn liZZbvmWT49JVrtc/aeOGDdZGneKiVmmqurkhCBl3/VEGgSQJsvcJfLUmM9Z0c7vDRfw rZuvQI06csGUFwbeQW5J42Ti05SzIj4kv/Fkbe1uKZq7f45D+6bYxuW458Kbq8HtJMTa xnmN9Bob7lZHJu+ew0NznUdQPTjJiSJNjNXW5GoT5X0E+XBsPv0MQtvZPFobw1RqenO+ kg5w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com. [209.132.183.28]) by mx.google.com with ESMTPS id 91si12096265qta.132.2017.07.10.14.38.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Jul 2017 14:38:06 -0700 (PDT) Received-SPF: pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; Authentication-Results: mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AAA8E4E4C3; Mon, 10 Jul 2017 21:38:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com AAA8E4E4C3 Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com AAA8E4E4C3 Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 42FBC60DD7; Mon, 10 Jul 2017 21:38:04 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 32286262; Mon, 10 Jul 2017 21:38:03 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v6ALc1lE015106 for ; Mon, 10 Jul 2017 17:38:01 -0400 Received: by smtp.corp.redhat.com (Postfix) id 0BB3017DD8; Mon, 10 Jul 2017 21:38:01 +0000 (UTC) Delivered-To: libvir-list@redhat.com Received: from worklaptop.redhat.com (ovpn-116-67.phx2.redhat.com [10.3.116.67]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6E91F60617; Mon, 10 Jul 2017 21:37:58 +0000 (UTC) From: Cole Robinson To: libvir-list@redhat.com Date: Mon, 10 Jul 2017 17:37:43 -0400 Message-Id: <6acc865c1ca03441606478105bf6d5cac6e4933b.1499722639.git.crobinso@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Cc: Andrea Bolognani Subject: [libvirt] [PATCH] qemu: process: Remove unused qemuCaps X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Mon, 10 Jul 2017 21:38:05 +0000 (UTC) After 405c0f07f5 qemuCaps is unused here, remove it from the call stack Signed-off-by: Cole Robinson --- 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 Reviewed-by: Andrea Bolognani 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)