From nobody Mon Feb 9 05:20:58 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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.129.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=1637253272; cv=none; d=zohomail.com; s=zohoarc; b=I4aeYJNfZ1/60t2wDMtLxelK/KpZ5cYjN1IyCh9s2w8q6mwGNQvyBJ/b5YZcbbVcXpp8yjOqBlUtXUnJyBsu0u835lUwcn0anHoCfDhyQOe1/0nqgiwIdllH/Hhf5VeQvL9gVjq31DDbv/J/93jjuQNEeAXiXUItVoc2yWOrUB0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1637253272; 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=3cgKSHLMmGkE1qE1e46URlJiOJR/EJTMZHS3Gv0GPCk=; b=dOb12AioBI2C+ku7aPKI/l2/ppX7ttqMjriB9vXrg61Z/xXi/swOenKjbPi8GPmKDnJQ37ZDiGMalYHHyJ+pBYNuaJcFEyDi4q4bSYvzq/BgWlP8134wG7e5SqttSGt+x9FsIlahT/nPcw5Nv7L9HdEMg2bYbYkVohXiG6FoTcM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.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.129.124]) by mx.zohomail.com with SMTPS id 1637253272832179.9448240220364; Thu, 18 Nov 2021 08:34:32 -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-357-kK0xa9e3P56u8QSqvnmP3w-1; Thu, 18 Nov 2021 11:34:30 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 600211922964; Thu, 18 Nov 2021 16:34:19 +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 1A44B5F4F5; Thu, 18 Nov 2021 16:34:25 +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 DE6751832DF8; Thu, 18 Nov 2021 16:34:24 +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 1AIGY8wM028212 for ; Thu, 18 Nov 2021 11:34:08 -0500 Received: by smtp.corp.redhat.com (Postfix) id C9D065BB0D; Thu, 18 Nov 2021 16:34:08 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.20]) by smtp.corp.redhat.com (Postfix) with ESMTP id 187BF5BAE0 for ; Thu, 18 Nov 2021 16:34:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1637253271; 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=3cgKSHLMmGkE1qE1e46URlJiOJR/EJTMZHS3Gv0GPCk=; b=co32YrmwTZiT4ZWMFlrk183QCzu+J3Zm3PM7YrG3AeE1ROCKC7wFqot4X5uwqY2VZ6Vuhl mYmSPGvIKDPCwtOZO4WuR+86s1in5pSUz+LG4ptkMUO9R6GfrJD81sD9I2aPxpKj3NJoVe E5GuUDraUKWe96awFqJ2mxDYBvsQp+g= X-MC-Unique: kK0xa9e3P56u8QSqvnmP3w-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 13/16] qemuDomainAttachChrDevice: Drop 'dev' variable Date: Thu, 18 Nov 2021 17:33:38 +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.15 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: 1637253273287100007 Content-Type: text/plain; charset="utf-8" It's referenced only once and it's a shortcut to the chardev source thus can be used directly. Signed-off-by: Peter Krempa --- src/qemu/qemu_hotplug.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 5e44210aff..3373ec2cdf 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -2184,7 +2184,6 @@ int qemuDomainAttachChrDevice(virQEMUDriver *driver, virDomainDef *vmdef =3D vm->def; g_autoptr(virJSONValue) devprops =3D NULL; g_autoptr(virJSONValue) netdevprops =3D NULL; - virDomainChrSourceDef *dev =3D chr->source; g_autofree char *charAlias =3D NULL; bool chardevAttached =3D false; bool teardowncgroup =3D false; @@ -2233,7 +2232,7 @@ int qemuDomainAttachChrDevice(virQEMUDriver *driver, if (qemuDomainChrPreInsert(vmdef, chr) < 0) goto cleanup; - if (qemuDomainAddChardevTLSObjects(driver, vm, dev, + if (qemuDomainAddChardevTLSObjects(driver, vm, chr->source, chr->info.alias, charAlias, &tlsAlias, &secAlias) < 0) goto audit; --=20 2.31.1