From nobody Tue Feb 10 01:31:43 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1549292681370409.9551989718507; Mon, 4 Feb 2019 07:04:41 -0800 (PST) Received: from localhost ([127.0.0.1]:44114 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gqfnc-0008Ks-5E for importer@patchew.org; Mon, 04 Feb 2019 10:04:40 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46097) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gqfab-0006G7-SG for qemu-devel@nongnu.org; Mon, 04 Feb 2019 09:51:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gqfTO-0005U6-Sw for qemu-devel@nongnu.org; Mon, 04 Feb 2019 09:43:48 -0500 Received: from mail-qt1-f177.google.com ([209.85.160.177]:35841) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gqfTO-0005QQ-IK for qemu-devel@nongnu.org; Mon, 04 Feb 2019 09:43:46 -0500 Received: by mail-qt1-f177.google.com with SMTP id r9so111872qtt.3 for ; Mon, 04 Feb 2019 06:43:41 -0800 (PST) Received: from redhat.com (pool-173-76-246-42.bstnma.fios.verizon.net. [173.76.246.42]) by smtp.gmail.com with ESMTPSA id f143sm16128249qka.73.2019.02.04.06.43.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 04 Feb 2019 06:43:39 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=fZo+5HfwKCklSPvhpyGkrb+1EWksrAxw5XVg5Ve8V74=; b=MrFsSdeE65RRch+a39dTiXNXwosHahASIc1bX5yf+IMlA26JfV3dm2PvUq/g+UuWP+ PJkX6+5jRlGyMt2pB7kuP8Anc8HJkygqmSJusR0MgszemKyDtCQUIK7gKbPwAQwMut3Z 2gpK+F4wGK96MUvSuKgN4iNaQbSnvYM55/naq0IRZL/VIrUZwEtYEjVyx9PRdS9dbQZO +8q7yCPBF97F8oWvcZHwHiVbSuXfGNmfnKOCj52B4SL+msxrnwBJ4+Ro798Ctgsw7htl e7LN6SfT/5M/edCwcmF5d6s4ezduiFRgb4wewwPU2rU1E69un+TGGrHl0aupJKo6fU3c 51cA== X-Gm-Message-State: AJcUukcJvqlXWvICLSif/7GTRPkLcJhcSlVQBIUnAzBvvLVBCNF/0R1V 3OlMY8awpRWrhBQW0tVGVQ92IuPOsufdgg== X-Google-Smtp-Source: ALg8bN4fJTDHJE5txztcWwNtAZL1BlQoHG0ORQ5oRXYkE10vcODRmn4Lnniu/Gls36FbcSyx1J9WDQ== X-Received: by 2002:a0c:9dc6:: with SMTP id p6mr49229112qvf.217.1549291420142; Mon, 04 Feb 2019 06:43:40 -0800 (PST) Date: Mon, 4 Feb 2019 09:43:38 -0500 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Message-ID: <20190204142638.27021-11-mst@redhat.com> References: <20190204142638.27021-1-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <20190204142638.27021-1-mst@redhat.com> X-Mailer: git-send-email 2.17.1.1206.gb667731e2e.dirty X-Mutt-Fcc: =sent X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.160.177 Subject: [Qemu-devel] [PULL 10/25] hw: virtio-pci: drop DO_UPCAST X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Li Qiang , Philippe =?utf-8?Q?Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" From: Li Qiang Use VIRTIO_PCI MACRO instead. Signed-off-by: Li Qiang Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/virtio/virtio-pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index b282109343..e978bfe760 100644 --- a/hw/virtio/virtio-pci.c +++ b/hw/virtio/virtio-pci.c @@ -591,7 +591,7 @@ virtio_address_space_read(VirtIOPCIProxy *proxy, hwaddr= addr, static void virtio_write_config(PCIDevice *pci_dev, uint32_t address, uint32_t val, int len) { - VirtIOPCIProxy *proxy =3D DO_UPCAST(VirtIOPCIProxy, pci_dev, pci_dev); + VirtIOPCIProxy *proxy =3D VIRTIO_PCI(pci_dev); VirtIODevice *vdev =3D virtio_bus_get_device(&proxy->bus); struct virtio_pci_cfg_cap *cfg; =20 @@ -624,7 +624,7 @@ static void virtio_write_config(PCIDevice *pci_dev, uin= t32_t address, static uint32_t virtio_read_config(PCIDevice *pci_dev, uint32_t address, int len) { - VirtIOPCIProxy *proxy =3D DO_UPCAST(VirtIOPCIProxy, pci_dev, pci_dev); + VirtIOPCIProxy *proxy =3D VIRTIO_PCI(pci_dev); struct virtio_pci_cfg_cap *cfg; =20 if (proxy->config_cap && --=20 MST