From nobody Fri May 3 17:35:49 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1658376173987215.128612271998; Wed, 20 Jul 2022 21:02:53 -0700 (PDT) Received: from localhost ([::1]:32890 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oENOk-0002pT-DV for importer@patchew.org; Thu, 21 Jul 2022 00:02:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58676) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oENMz-00023v-3A for qemu-devel@nongnu.org; Thu, 21 Jul 2022 00:01:01 -0400 Received: from mail.loongson.cn ([114.242.206.163]:54046 helo=loongson.cn) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oENMw-0008DO-HV for qemu-devel@nongnu.org; Thu, 21 Jul 2022 00:01:00 -0400 Received: from localhost.localdomain (unknown [10.2.5.185]) by mail.loongson.cn (Coremail) with SMTP id AQAAf9AxCeFxz9hildsrAA--.15538S2; Thu, 21 Jul 2022 12:00:49 +0800 (CST) From: Song Gao To: qemu-devel@nongnu.org Cc: richard.henderson@linaro.org, peter.maydell@linaro.org, yangxiaojuan@loongson.cn, gaosong@loongson.cn Subject: [PATCH] hw/loongarch: remove acpi-build.c unused variable 'aml_len' Date: Thu, 21 Jul 2022 12:00:46 +0800 Message-Id: <20220721040046.3985609-1-gaosong@loongson.cn> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-CM-TRANSID: AQAAf9AxCeFxz9hildsrAA--.15538S2 X-Coremail-Antispam: 1UD129KBjvJXoW7urWUWF4xKr4xJry3uw4xCrg_yoW8WFy7pa y7ZrWktrsagw1DGw1DGr4vvFn8Jr4DCasrX3Wxtw1Fg3Wqgr1UWF4xtryavFy7Aa4kJF98 ZF1Dta4UuF48JrUanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnUUvcSsGvfC2KfnxnUUI43ZEXa7xR_UUUUUUUUU== X-CM-SenderInfo: 5jdr20tqj6z05rqj20fqof0/ Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=114.242.206.163; envelope-from=gaosong@loongson.cn; helo=loongson.cn X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZM-MESSAGEID: 1658376176693100001 Content-Type: text/plain; charset="utf-8" Fix a compiler warning on openbsd: ../src/hw/loongarch/acpi-build.c:416:12: warning: variable 'aml_len' set but not used [-Wunused-but-set-variable] size_t aml_len =3D 0; ^ Reported-by: Peter Maydell Signed-off-by: Song Gao Reviewed-by: Richard Henderson --- hw/loongarch/acpi-build.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/hw/loongarch/acpi-build.c b/hw/loongarch/acpi-build.c index b95b83b079..f7f6fc9b8a 100644 --- a/hw/loongarch/acpi-build.c +++ b/hw/loongarch/acpi-build.c @@ -413,7 +413,6 @@ static void acpi_build(AcpiBuildTables *tables, Machine= State *machine) AcpiFadtData fadt_data; unsigned facs, rsdt, fadt, dsdt; uint8_t *u; - size_t aml_len =3D 0; GArray *tables_blob =3D tables->table_data; =20 init_common_fadt_data(&fadt_data); @@ -437,12 +436,6 @@ static void acpi_build(AcpiBuildTables *tables, Machin= eState *machine) dsdt =3D tables_blob->len; build_dsdt(tables_blob, tables->linker, machine); =20 - /* - * Count the size of the DSDT, we will need it for - * legacy sizing of ACPI tables. - */ - aml_len +=3D tables_blob->len - dsdt; - /* ACPI tables pointed to by RSDT */ fadt =3D tables_blob->len; acpi_add_table(table_offsets, tables_blob); @@ -451,7 +444,6 @@ static void acpi_build(AcpiBuildTables *tables, Machine= State *machine) fadt_data.xdsdt_tbl_offset =3D &dsdt; build_fadt(tables_blob, tables->linker, &fadt_data, lams->oem_id, lams->oem_table_id); - aml_len +=3D tables_blob->len - fadt; =20 acpi_add_table(table_offsets, tables_blob); build_madt(tables_blob, tables->linker, lams); --=20 2.31.1