From nobody Tue Oct 22 23:36:40 2024 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=1694699815; cv=none; d=zohomail.com; s=zohoarc; b=SK4GxP9oehhRWy8C+q6KKOW6Ngr4OFEHz7iDIB7iWTOxHhIkMxpPodS26hoQlmyKWlAGC6HHUe5sxOyD1jiB7rkgZjlYfwMZjcwAXpF+W+iEumwmWPKyuHWXwwGM6pk52SUL0dvTqFKlH8hysNVH50vsP8gsu1fb/bppyip0+HM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1694699815; 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=VzT/jaKBXr1hO782wM9Qcok5E0ikjCoxO4gHYJNQOmI=; b=cIYvnumkrcP5pahWYu5FSJPW5E7GroqT6siH/0r4rn/xrTDfzHHhJDInNU4mtoD2QigXUsHWBqW2RNpIOd5t9lukGBlQtldrdI5sWX3jgJx3O6O0fOQBY4URsVChYCF9hSIKtX95zkAA/OsdrqdGMI9CXge91mXJavrRlhDR12Q= 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 1694699815751964.4905814151249; Thu, 14 Sep 2023 06:56:55 -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-224-awAntMJaP_OBrc8wOdDUqg-1; Thu, 14 Sep 2023 09:56:52 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8E323917DC3; Thu, 14 Sep 2023 13:56:48 +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 7823640C6ECE; Thu, 14 Sep 2023 13:56:48 +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 881631946A6A; Thu, 14 Sep 2023 13:56:29 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id AFFF019466FB for ; Thu, 14 Sep 2023 13:56:28 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id ABBA940C6EBF; Thu, 14 Sep 2023 13:56:28 +0000 (UTC) Received: from maggie.brq.redhat.com (unknown [10.43.2.46]) by smtp.corp.redhat.com (Postfix) with ESMTP id 53C5540C6EC0 for ; Thu, 14 Sep 2023 13:56:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694699814; 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=VzT/jaKBXr1hO782wM9Qcok5E0ikjCoxO4gHYJNQOmI=; b=Z7BT8RyqM27WoajYydnXDyUPoC/EFvPM4NEmORens/lKyVccM/sTnnvnT3q/y9x+U8qq2e x0CSmdSvk7UBigGp0/ahzoYUr9i5LHcvTjn0HAg7KqX18+Gl+NG0OmWutTCa6vJJBrca6Z m0RqCUd3EPbKd5VKmC5vwD/8M5l0kAg= X-MC-Unique: awAntMJaP_OBrc8wOdDUqg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 06/20] qemu_domain_address: Drop needless typecast to virDomainDiskModel Date: Thu, 14 Sep 2023 15:56:07 +0200 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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 3.1 on 10.11.54.2 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: 1694699817941100001 Content-Type: text/plain; charset="utf-8"; x-default="true" The 'mode' member of _virDomainDiskDef is already declared of virDomainDiskModel type. Hence, there is no need to typecast the variable when passing to switch() statements. Signed-off-by: Michal Privoznik --- src/qemu/qemu_domain_address.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c index 38411b4872..0875ed0401 100644 --- a/src/qemu/qemu_domain_address.c +++ b/src/qemu/qemu_domain_address.c @@ -793,7 +793,7 @@ qemuDomainDeviceCalculatePCIConnectFlags(virDomainDevic= eDef *dev, switch ((virDomainDiskBus) dev->data.disk->bus) { case VIR_DOMAIN_DISK_BUS_VIRTIO: /* only virtio disks use PCI */ - switch ((virDomainDiskModel) dev->data.disk->model) { + switch (dev->data.disk->model) { case VIR_DOMAIN_DISK_MODEL_VIRTIO_TRANSITIONAL: /* Transitional devices only work in conventional PCI slot= s */ return pciFlags; --=20 2.41.0