From nobody Sat Feb 7 09:34:59 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1639053162; cv=none; d=zohomail.com; s=zohoarc; b=Z+7JRQGnbdQ/7JWDm+ZaMof1W1vMY5FI+t7yvN/4yywQdv+481GS5kdxJvg4MdmXfnkZnRrCPT7RSbhdjV5+bcTKcAbUGwesQQ9lA07IsHCqYfAnGZDN10NrVuFfTz2Psljy1SbIugl6E784w3aYWx7v+b/ekXDEkpMNFPmbdGk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1639053162; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=a84HAanqXggCE+r3y8rnkHZmxIrY+wBmPCxUexfvfX0=; b=eoJFXEMka+DcARRdwZSmmzjVJ/Wg0NQi6qK4F3M7ZSNuMsSFaauXccckPLeTj9b+gPGDkHt7yJQ6VFcXx/hHC8KmVsrYM5oUT0g7lozmaAFKs1E+7sK7LrmOoViGC2TzqsCSfxYYKRNzMhS5M1b5TWgUxRNICyoE1Ka+N2ZE3vQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1639053162349459.0877362807016; Thu, 9 Dec 2021 04:32:42 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-598-uroTFYSnNiSiOMsNVYC_hw-1; Thu, 09 Dec 2021 07:32:37 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3500D10144E2; Thu, 9 Dec 2021 12:32:33 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 17AD745D71; Thu, 9 Dec 2021 12:32:33 +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 D984B181844F; Thu, 9 Dec 2021 12:32:32 +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 1B9CVK7w017844 for ; Thu, 9 Dec 2021 07:31:20 -0500 Received: by smtp.corp.redhat.com (Postfix) id EB46F694D9; Thu, 9 Dec 2021 12:31:20 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4EECC60C25 for ; Thu, 9 Dec 2021 12:31:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1639053161; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=a84HAanqXggCE+r3y8rnkHZmxIrY+wBmPCxUexfvfX0=; b=VPHJZKZuoGZbUaSAUAl6hdM3PhmNgGLylfgp0kKKHgewafvQRiYTZy9IZvh8k+BISqNU3Y JnjKJMFD/+dYdYPE6al61e1eCIF/7+wCSJhegtzhAnJhTs3cB6adqIJyzi/iLJitQ2evcY gWJuQBTo8Rm6sJl/MEZS5ugT9l+IBEY= X-MC-Unique: uroTFYSnNiSiOMsNVYC_hw-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 18/24] qemuBuildChardevCommand: Remove unused 'cfg' parameter Date: Thu, 9 Dec 2021 13:30:53 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1639053163866100001 Content-Type: text/plain; charset="utf-8" Now that the parameter is unused we can remove it as well as from each caller that doesn't need it any more. Signed-off-by: Peter Krempa --- src/qemu/qemu_command.c | 47 +++++++++++------------------------------ 1 file changed, 12 insertions(+), 35 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 583e311008..0fb7b83d3f 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -1476,7 +1476,6 @@ qemuBuildChardevStr(const virDomainChrSourceDef *dev, static int qemuBuildChardevCommand(virCommand *cmd, - virQEMUDriverConfig *cfg G_GNUC_UNUSED, const virDomainChrSourceDef *dev, const char *charAlias, virQEMUCaps *qemuCaps) @@ -5570,14 +5569,12 @@ qemuBuildHostdevCommandLine(virCommand *cmd, static int qemuBuildMonitorCommandLine(virCommand *cmd, - virQEMUDriverConfig *cfg, qemuDomainObjPrivate *priv) { if (!priv->monConfig) return 0; if (qemuBuildChardevCommand(cmd, - cfg, priv->monConfig, "charmonitor", priv->qemuCaps) < 0) @@ -5698,7 +5695,6 @@ qemuBuildSclpDevProps(virDomainChrDef *dev) static int qemuBuildRNGBackendChrdev(virCommand *cmd, - virQEMUDriverConfig *cfg, virDomainRNGDef *rng, virQEMUCaps *qemuCaps) { @@ -5713,7 +5709,6 @@ qemuBuildRNGBackendChrdev(virCommand *cmd, case VIR_DOMAIN_RNG_BACKEND_EGD: if (qemuBuildChardevCommand(cmd, - cfg, rng->source.chardev, charAlias, qemuCaps) < 0) @@ -5805,7 +5800,6 @@ qemuBuildRNGDevProps(const virDomainDef *def, static int qemuBuildRNGCommandLine(virCommand *cmd, - virQEMUDriverConfig *cfg, const virDomainDef *def, virQEMUCaps *qemuCaps) { @@ -5823,7 +5817,7 @@ qemuBuildRNGCommandLine(virCommand *cmd, } /* possibly add character device for backend */ - if (qemuBuildRNGBackendChrdev(cmd, cfg, rng, qemuCaps) < 0) + if (qemuBuildRNGBackendChrdev(cmd, rng, qemuCaps) < 0) return -1; if (qemuBuildRNGBackendProps(rng, &props) < 0) @@ -8645,18 +8639,15 @@ qemuBuildGraphicsCommandLine(virQEMUDriverConfig *c= fg, } static int -qemuInterfaceVhostuserConnect(virQEMUDriver *driver, - virCommand *cmd, +qemuInterfaceVhostuserConnect(virCommand *cmd, virDomainNetDef *net, virQEMUCaps *qemuCaps) { - g_autoptr(virQEMUDriverConfig) cfg =3D virQEMUDriverGetConfig(driver); g_autofree char *charAlias =3D qemuAliasChardevFromDevAlias(net->info.= alias); switch ((virDomainChrType)net->data.vhostuser->type) { case VIR_DOMAIN_CHR_TYPE_UNIX: if (qemuBuildChardevCommand(cmd, - cfg, net->data.vhostuser, charAlias, qemuCaps) < 0) @@ -8777,7 +8768,7 @@ qemuBuildInterfaceCommandLine(virQEMUDriver *driver, case VIR_DOMAIN_NET_TYPE_VHOSTUSER: requireNicdev =3D true; - if (qemuInterfaceVhostuserConnect(driver, cmd, net, qemuCaps) < 0) + if (qemuInterfaceVhostuserConnect(cmd, net, qemuCaps) < 0) goto cleanup; if (virNetDevOpenvswitchGetVhostuserIfname(net->data.vhostuser->da= ta.nix.path, @@ -9049,7 +9040,6 @@ qemuBuildNetCommandLine(virQEMUDriver *driver, static int qemuBuildSmartcardCommandLine(virCommand *cmd, - virQEMUDriverConfig *cfg, const virDomainDef *def, virQEMUCaps *qemuCaps) { @@ -9095,7 +9085,6 @@ qemuBuildSmartcardCommandLine(virCommand *cmd, g_autofree char *charAlias =3D qemuAliasChardevFromDevAlias(smartc= ard->info.alias); if (qemuBuildChardevCommand(cmd, - cfg, smartcard->data.passthru, charAlias, qemuCaps) < 0) @@ -9241,7 +9230,6 @@ qemuBuildShmemBackendMemProps(virDomainShmemDef *shme= m) static int qemuBuildShmemCommandLine(virCommand *cmd, - virQEMUDriverConfig *cfg, virDomainDef *def, virDomainShmemDef *shmem, virQEMUCaps *qemuCaps) @@ -9309,7 +9297,6 @@ qemuBuildShmemCommandLine(virCommand *cmd, g_autofree char *charAlias =3D qemuAliasChardevFromDevAlias(shmem-= >info.alias); if (qemuBuildChardevCommand(cmd, - cfg, shmem->server.chr, charAlias, qemuCaps) < 0) @@ -9406,7 +9393,6 @@ qemuChrIsPlatformDevice(const virDomainDef *def, static int qemuBuildSerialCommandLine(virCommand *cmd, - virQEMUDriverConfig *cfg, const virDomainDef *def, virQEMUCaps *qemuCaps) { @@ -9428,7 +9414,6 @@ qemuBuildSerialCommandLine(virCommand *cmd, continue; if (qemuBuildChardevCommand(cmd, - cfg, serial->source, charAlias, qemuCaps) < 0) @@ -9461,7 +9446,6 @@ qemuBuildSerialCommandLine(virCommand *cmd, static int qemuBuildParallelsCommandLine(virCommand *cmd, - virQEMUDriverConfig *cfg, const virDomainDef *def, virQEMUCaps *qemuCaps) { @@ -9472,7 +9456,6 @@ qemuBuildParallelsCommandLine(virCommand *cmd, g_autofree char *charAlias =3D qemuAliasChardevFromDevAlias(parall= el->info.alias); if (qemuBuildChardevCommand(cmd, - cfg, parallel->source, charAlias, qemuCaps) < 0) @@ -9489,7 +9472,6 @@ qemuBuildParallelsCommandLine(virCommand *cmd, static int qemuBuildChannelsCommandLine(virCommand *cmd, - virQEMUDriverConfig *cfg, const virDomainDef *def, virQEMUCaps *qemuCaps) { @@ -9501,7 +9483,6 @@ qemuBuildChannelsCommandLine(virCommand *cmd, g_autofree char *charAlias =3D qemuAliasChardevFromDevAlias(channe= l->info.alias); if (qemuBuildChardevCommand(cmd, - cfg, channel->source, charAlias, qemuCaps) < 0) @@ -9534,7 +9515,6 @@ qemuBuildChannelsCommandLine(virCommand *cmd, static int qemuBuildConsoleCommandLine(virCommand *cmd, - virQEMUDriverConfig *cfg, const virDomainDef *def, virQEMUCaps *qemuCaps) { @@ -9550,7 +9530,6 @@ qemuBuildConsoleCommandLine(virCommand *cmd, case VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_SCLPLM: case VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_VIRTIO: if (qemuBuildChardevCommand(cmd, - cfg, console->source, charAlias, qemuCaps) < 0) @@ -9632,7 +9611,6 @@ qemuBuildRedirdevDevProps(const virDomainDef *def, static int qemuBuildRedirdevCommandLine(virCommand *cmd, - virQEMUDriverConfig *cfg, const virDomainDef *def, virQEMUCaps *qemuCaps) { @@ -9644,7 +9622,6 @@ qemuBuildRedirdevCommandLine(virCommand *cmd, g_autofree char *charAlias =3D qemuAliasChardevFromDevAlias(redird= ev->info.alias); if (qemuBuildChardevCommand(cmd, - cfg, redirdev->source, charAlias, qemuCaps) < 0) @@ -10614,7 +10591,7 @@ qemuBuildCommandLine(virQEMUDriver *driver, virCommandAddArg(cmd, "-no-user-config"); virCommandAddArg(cmd, "-nodefaults"); - if (qemuBuildMonitorCommandLine(cmd, cfg, priv) < 0) + if (qemuBuildMonitorCommandLine(cmd, priv) < 0) return NULL; if (qemuBuildClockCommandLine(cmd, def, qemuCaps) < 0) @@ -10653,19 +10630,19 @@ qemuBuildCommandLine(virQEMUDriver *driver, nnicindexes, nicindexes) < 0) return NULL; - if (qemuBuildSmartcardCommandLine(cmd, cfg, def, qemuCaps) < 0) + if (qemuBuildSmartcardCommandLine(cmd, def, qemuCaps) < 0) return NULL; - if (qemuBuildSerialCommandLine(cmd, cfg, def, qemuCaps) < 0) + if (qemuBuildSerialCommandLine(cmd, def, qemuCaps) < 0) return NULL; - if (qemuBuildParallelsCommandLine(cmd, cfg, def, qemuCaps) < 0) + if (qemuBuildParallelsCommandLine(cmd, def, qemuCaps) < 0) return NULL; - if (qemuBuildChannelsCommandLine(cmd, cfg, def, qemuCaps) < 0) + if (qemuBuildChannelsCommandLine(cmd, def, qemuCaps) < 0) return NULL; - if (qemuBuildConsoleCommandLine(cmd, cfg, def, qemuCaps) < 0) + if (qemuBuildConsoleCommandLine(cmd, def, qemuCaps) < 0) return NULL; if (qemuBuildTPMsCommandLine(cmd, def, qemuCaps) < 0) @@ -10689,7 +10666,7 @@ qemuBuildCommandLine(virQEMUDriver *driver, if (qemuBuildWatchdogCommandLine(cmd, def, qemuCaps) < 0) return NULL; - if (qemuBuildRedirdevCommandLine(cmd, cfg, def, qemuCaps) < 0) + if (qemuBuildRedirdevCommandLine(cmd, def, qemuCaps) < 0) return NULL; if (qemuBuildHostdevCommandLine(cmd, def, qemuCaps) < 0) @@ -10701,7 +10678,7 @@ qemuBuildCommandLine(virQEMUDriver *driver, if (qemuBuildMemballoonCommandLine(cmd, def, qemuCaps) < 0) return NULL; - if (qemuBuildRNGCommandLine(cmd, cfg, def, qemuCaps) < 0) + if (qemuBuildRNGCommandLine(cmd, def, qemuCaps) < 0) return NULL; if (qemuBuildNVRAMCommandLine(cmd, def) < 0) @@ -10735,7 +10712,7 @@ qemuBuildCommandLine(virQEMUDriver *driver, return NULL; for (i =3D 0; i < def->nshmems; i++) { - if (qemuBuildShmemCommandLine(cmd, cfg, def, def->shmems[i], qemuC= aps) < 0) + if (qemuBuildShmemCommandLine(cmd, def, def->shmems[i], qemuCaps) = < 0) return NULL; } --=20 2.31.1