From nobody Mon Feb 9 02:27:42 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 1547216847639760.0679918355959; Fri, 11 Jan 2019 06:27:27 -0800 (PST) Received: from localhost ([127.0.0.1]:36232 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ghxmL-0004pj-It for importer@patchew.org; Fri, 11 Jan 2019 09:27:21 -0500 Received: from eggs.gnu.org ([209.51.188.92]:48240) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ghxdw-0005j5-EU for qemu-devel@nongnu.org; Fri, 11 Jan 2019 09:18:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ghxX7-0005xL-Ow for qemu-devel@nongnu.org; Fri, 11 Jan 2019 09:11:38 -0500 Received: from mx1.redhat.com ([209.132.183.28]:38532) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ghxX5-0005gy-Fg; Fri, 11 Jan 2019 09:11:35 -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 mx1.redhat.com (Postfix) with ESMTPS id D5886C05E767; Fri, 11 Jan 2019 14:11:30 +0000 (UTC) Received: from x1w.redhat.com (ovpn-204-254.brq.redhat.com [10.40.204.254]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2782E5D6A9; Fri, 11 Jan 2019 14:11:23 +0000 (UTC) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: Paolo Bonzini , Thomas Huth , qemu-devel@nongnu.org Date: Fri, 11 Jan 2019 15:08:52 +0100 Message-Id: <20190111140857.4211-11-philmd@redhat.com> In-Reply-To: <20190111140857.4211-1-philmd@redhat.com> References: <20190111140857.4211-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Fri, 11 Jan 2019 14:11:30 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 10/15] range: Remove Range from "qemu/typedefs.h" 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 , Xiao Guangrong , qemu-block@nongnu.org, "Michael S. Tsirkin" , Laszlo Ersek , qemu-arm@nongnu.org, Gerd Hoffmann , Igor Mammedov , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Range is only used in "hw/pci-host/q35.h" in the MCHPCIState, and in "hw/pci/pci.h" by pci_bus_get_w64_range(). Let them include "qemu/range.h" directly to simplify "qemu/typedefs.h". To clean "qemu/typedefs.h", move the declaration to "qemu/range.h" (removing the forward declaration). Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- include/hw/pci-host/q35.h | 1 + include/hw/pci/pci.h | 1 + include/qemu/range.h | 4 ++-- include/qemu/typedefs.h | 1 - 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/hw/pci-host/q35.h b/include/hw/pci-host/q35.h index 8f4ddde393..236ff008c9 100644 --- a/include/hw/pci-host/q35.h +++ b/include/hw/pci-host/q35.h @@ -22,6 +22,7 @@ #ifndef HW_Q35_H #define HW_Q35_H =20 +#include "qemu/range.h" #include "hw/hw.h" #include "hw/isa/isa.h" #include "hw/sysbus.h" diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h index d87f5f93e9..f9c020fd98 100644 --- a/include/hw/pci/pci.h +++ b/include/hw/pci/pci.h @@ -1,6 +1,7 @@ #ifndef QEMU_PCI_H #define QEMU_PCI_H =20 +#include "qemu/range.h" #include "hw/qdev.h" #include "exec/memory.h" #include "sysemu/dma.h" diff --git a/include/qemu/range.h b/include/qemu/range.h index 7e75f4e655..aaa09c8306 100644 --- a/include/qemu/range.h +++ b/include/qemu/range.h @@ -29,7 +29,7 @@ * - Ranges must not wrap around 0, but can include UINT64_MAX. */ =20 -struct Range { +typedef struct Range { /* * Do not access members directly, use the functions! * A non-empty range has @lob <=3D @upb. @@ -37,7 +37,7 @@ struct Range { */ uint64_t lob; /* inclusive lower bound */ uint64_t upb; /* inclusive upper bound */ -}; +} Range; =20 static inline void range_invariant(const Range *range) { diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h index 5e9a070ff3..fb9f29d892 100644 --- a/include/qemu/typedefs.h +++ b/include/qemu/typedefs.h @@ -97,7 +97,6 @@ typedef struct QNum QNum; typedef struct QObject QObject; typedef struct QString QString; typedef struct RAMBlock RAMBlock; -typedef struct Range Range; typedef struct SHPCDevice SHPCDevice; typedef struct uWireSlave uWireSlave; typedef struct VirtIODevice VirtIODevice; --=20 2.17.2