From nobody Sun Feb 8 22:00:33 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=1656932966; cv=none; d=zohomail.com; s=zohoarc; b=SINyzasdsJYWLcRO/3AKso/+KvtkNTwQKVGOKF4UjA02ZjGrpJVjXYZlzmN2Ftr/QkZ/aToQ0eYfCQchuYxhIzTanHCNEns241zSVgtXWkpU5RPLxcn818cYi97cXXtfocmN9d35YDbGUEDBbEJlTQ+B3ezaMTa1QPvWWO0kypo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1656932966; 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=a1M7kjACIWLnxG6YkmDQYh5m7Am2Zhzn1L6uuO14z0k=; b=Atl3ciy092IIbnlKgmQDQiqQKbYb4McS7KsUsl5nX8U6Ct/PlvpcN9doeR/gMw1i2YsoHlbOJgoxKs6dnarM9EHacRf1w/iZOqDmtKAh3F2zps2v9aBoRiO1npX2xdFsp+NvtWKHxqZ+P5MOIWKLG/qTeEfCsYgvvoXCjW6YtFM= 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 1656932966383797.8543845690547; Mon, 4 Jul 2022 04:09:26 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-444-mzJfhQAUPTu1xqG6p8pX9g-1; Mon, 04 Jul 2022 07:09:21 -0400 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8778E1019C8D; Mon, 4 Jul 2022 11:09:16 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2D38A492C3B; Mon, 4 Jul 2022 11:09:16 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id BC7F4194704A; Mon, 4 Jul 2022 11:09:15 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 3E44219466DF for ; Mon, 4 Jul 2022 11:09:14 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 2B94B2166B29; Mon, 4 Jul 2022 11:09:14 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id CBD0D2166B26 for ; Mon, 4 Jul 2022 11:09:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1656932964; 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=a1M7kjACIWLnxG6YkmDQYh5m7Am2Zhzn1L6uuO14z0k=; b=GgqKMMdhNwwFse4pMmHz853Q5d3r/lxmINp39tjNC50yzX3FLfCaKW+mHuZh9p2m2ys+9L bPnR3DW1vLP1WZYHJo08Kken0gmtHPLuSwFtxjk/Df3FufEkZ4hj/x0xtZKwVnazv1JeKg /IkuJvOxrtLlyuOy5bL4zhK5ZsPY/0E= X-MC-Unique: mzJfhQAUPTu1xqG6p8pX9g-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 1/3] qemu_domain_address: Drop needless virDomainIOMMUModel typecast Date: Mon, 4 Jul 2022 13:09:10 +0200 Message-Id: <7b9d937bc47363e15d6f17ea3c6fc714ce5f61d6.1656932858.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 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: 1656932968226100005 Content-Type: text/plain; charset="utf-8"; x-default="true" There are two places where the @model member of _virDomainIOMMUDef struct is typecasted to virDomainIOMMUModel which is completely unnecessary because the struct already defines the member of that type. Signed-off-by: Michal Privoznik --- src/qemu/qemu_domain_address.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c index 753733d1b9..026be99ba9 100644 --- a/src/qemu/qemu_domain_address.c +++ b/src/qemu/qemu_domain_address.c @@ -1003,7 +1003,7 @@ qemuDomainDeviceCalculatePCIConnectFlags(virDomainDev= iceDef *dev, break; =20 case VIR_DOMAIN_DEVICE_IOMMU: - switch ((virDomainIOMMUModel) dev->data.iommu->model) { + switch (dev->data.iommu->model) { case VIR_DOMAIN_IOMMU_MODEL_VIRTIO: return virtioFlags | VIR_PCI_CONNECT_INTEGRATED; =20 @@ -2384,7 +2384,7 @@ qemuDomainAssignDevicePCISlots(virDomainDef *def, if (def->iommu) { virDomainIOMMUDef *iommu =3D def->iommu; =20 - switch ((virDomainIOMMUModel) iommu->model) { + switch (iommu->model) { case VIR_DOMAIN_IOMMU_MODEL_VIRTIO: if (virDeviceInfoPCIAddressIsWanted(&iommu->info) && qemuDomainPCIAddressReserveNextAddr(addrs, &iommu->info) <= 0) { --=20 2.35.1