From nobody Mon Nov 10 01:17:20 2025 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=linux.intel.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 155245256983487.04800939393328; Tue, 12 Mar 2019 21:49:29 -0700 (PDT) Received: from localhost ([127.0.0.1]:38268 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3vpR-00072O-CY for importer@patchew.org; Wed, 13 Mar 2019 00:49:22 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40039) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3vkE-0003Lf-C8 for qemu-devel@nongnu.org; Wed, 13 Mar 2019 00:43:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h3vkC-0003Zo-Lz for qemu-devel@nongnu.org; Wed, 13 Mar 2019 00:43:57 -0400 Received: from mga17.intel.com ([192.55.52.151]:13002) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h3vkC-0003X3-3p; Wed, 13 Mar 2019 00:43:56 -0400 Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Mar 2019 21:43:55 -0700 Received: from richard.sh.intel.com (HELO localhost) ([10.239.159.54]) by fmsmga008.fm.intel.com with ESMTP; 12 Mar 2019 21:43:54 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,473,1544515200"; d="scan'208";a="131180359" From: Wei Yang To: qemu-devel@nongnu.org, qemu-arm@nongnu.org Date: Wed, 13 Mar 2019 12:42:52 +0800 Message-Id: <20190313044253.31988-3-richardw.yang@linux.intel.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190313044253.31988-1-richardw.yang@linux.intel.com> References: <20190313044253.31988-1-richardw.yang@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 192.55.52.151 Subject: [Qemu-devel] [RFC PATCH 2/3] hw/arm/virt-acpi-build: remove unnecessary variable mcfg_start 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@linaro.org, mst@redhat.com, shannon.zhaosl@gmail.com, Wei Yang , imammedo@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" mcfg_start points to the start of MCFG table and is used in build_header. While this information could be derived from mcfg. This patch removes the unnecessary variable mcfg_start. Signed-off-by: Wei Yang Reviewed-by: Igor Mammedov --- hw/arm/virt-acpi-build.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index 7713c2d809..ae7858a79a 100644 --- a/hw/arm/virt-acpi-build.c +++ b/hw/arm/virt-acpi-build.c @@ -562,18 +562,15 @@ build_mcfg(GArray *table_data, BIOSLinker *linker, Ac= piMcfgInfo *info) { AcpiTableMcfg *mcfg; int len =3D sizeof(*mcfg) + sizeof(mcfg->allocation[0]); - int mcfg_start =3D table_data->len; =20 mcfg =3D acpi_data_push(table_data, len); mcfg->allocation[0].address =3D cpu_to_le64(info->mcfg_base); - /* Only a single allocation so no need to play with segments */ mcfg->allocation[0].pci_segment =3D cpu_to_le16(0); mcfg->allocation[0].start_bus_number =3D 0; mcfg->allocation[0].end_bus_number =3D PCIE_MMCFG_BUS(info->mcfg_size = - 1); =20 - build_header(linker, table_data, (void *)(table_data->data + mcfg_star= t), - "MCFG", table_data->len - mcfg_start, 1, NULL, NULL); + build_header(linker, table_data, (void *)mcfg, "MCFG", len, 1, NULL, N= ULL); } =20 /* GTDT */ --=20 2.19.1