From patchwork Fri Aug 5 19:55:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 595512 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:b345:0:0:0:0 with SMTP id w5csp1559747maz; Fri, 5 Aug 2022 12:56:34 -0700 (PDT) X-Google-Smtp-Source: AA6agR7F1IkMhOZRBKEasONZou9uv+i0a1lSIPzY3KCKq7vhSruw21vCdQ0cmF+ZpHfOn3wMCu3L X-Received: by 2002:a05:622a:1705:b0:31e:eecb:2af6 with SMTP id h5-20020a05622a170500b0031eeecb2af6mr7419378qtk.69.1659729394486; Fri, 05 Aug 2022 12:56:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659729394; cv=none; d=google.com; s=arc-20160816; b=nKSspibCGkr/5Sp3nu7yiXGh3IEI9pRD2lE5/OArQ3j1fUAgBZ5SnkbfAAqpfg/TEd AsNzd0VB9PxiWunHbTRtCU9EPxoZOLw1t/snZ8bcSzxlTtNz1p0Uc4T5zIOR5q1/n8nX 6sxgSbeGZESbAw9wkVISM7+M9Mpc/ZHxHjlAO+DVDBJtA+D0nUF9iVopI/XpO9emsKd0 AHc+wmXIyrBaWezJDHBpZErKSdUE0Zm/rHoiAzEPpUvnRqa9SixaXN4cG7cTBMZxqv9A FsD/ofjGtkPsblOIKlZMWnmLmy88vn7mpUQxVdArQEMdiBjydsV1/B3G1ALcvX4xr/M0 A/SA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=4MB0kNBsKeqajf853oKvTERPcRFUevz8GQAfrSDwCPo=; b=Yr1+0Vm4/Q7sHbQBamJDQDrznYml6JEvaabeN581nUWhRp1GC5Qqj5iKN1/0RlT1j5 lBuTJWLjsh4nLqJHsG3R+Vmz1RytVe4SV2co2aJ1WDBJwRfOryrYixr+2gDaGkqTTH4c 0g/ppSB7AsoyKLHKGnvQsg0J+liVPRh86kp4bW3NzRl92qQWoMQSTh7sbKzmyEJTUpGt I7CG7zBATDRR9jbdGNDwdYIF1HdtDG8JO9bcYb7ySpv6RoVFAu/S6i6ETJjOq6FnD+8r tYs2dcGVA6KxYvAnEyUv2B+SFtyRwCsY8yIZ1IDB89bGIfG/VEYCq5P30+bhx0dPSEfW 3bGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Y+Aanmji; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id r131-20020a37a889000000b006b5939b6ea2si2702432qke.144.2022.08.05.12.56.34 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 Aug 2022 12:56:34 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Y+Aanmji; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:35178 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oK3Qw-0006Ua-1X for patch@linaro.org; Fri, 05 Aug 2022 15:56:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37828) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oK3Pn-0006R2-9F for qemu-devel@nongnu.org; Fri, 05 Aug 2022 15:55:23 -0400 Received: from mail-pj1-x1029.google.com ([2607:f8b0:4864:20::1029]:46850) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oK3Pl-0004Ve-J3 for qemu-devel@nongnu.org; Fri, 05 Aug 2022 15:55:23 -0400 Received: by mail-pj1-x1029.google.com with SMTP id q7-20020a17090a7a8700b001f300db8677so3810894pjf.5 for ; Fri, 05 Aug 2022 12:55:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4MB0kNBsKeqajf853oKvTERPcRFUevz8GQAfrSDwCPo=; b=Y+AanmjielSl7eeqmq/xQF2T/QH4R/aFHpTlJlyy4/xn4BcOhrgliBjFgNPMvPVNM4 Zf9lT4w/ZpKWZHWfe3JQ02Chd7T8nNM+nuKYYntdKYNTTHsIzffcRG0w9Atrq1UoxwdB TjnH+NAxQm4SBntvpOjpoF5q/5hzdHJWlVY6y+YVOBuQPIUOEn3aUd3f6wg+xJglwlmO 65+dg/m8A2FgGq13W6PvLvomrjhBFHuydq8yNAMyrFx1ywZWy1dSeyyZEmtGUjIwz9MA Wc+nC1M4fiKmQk+N6+yaZl2SIGwq4FCESNZHLZlgcyAK2x16eM+P5d677v7aIvnzN9br TIOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=4MB0kNBsKeqajf853oKvTERPcRFUevz8GQAfrSDwCPo=; b=rMoa5+ZU6BO0z/4zUPP+RymIs9J9uAA1U+9PAdZA19v7LC2rrOC1DaglpjM/cuMrQH I75ZI2gXI9CbubE2a4eDzC/cwCiwtsaY2s3xkEYLcUOBNkGlClU7bSEkj/uJQ4EphfuC tuf5hAh8lntVCyxHbvXyDtd/eEoL7Jyq8YZF0edZhYgswtSdexVLkN9zYP5ixob+0nBs /PvPP60PEBQBMDso340aWz/MmuXg6P0ak2ln87GzrA8bMJW7lp5UIALtaU4CgtdkCGyd DLLtHhpQF+WExXLeBoz8usCC1E942VTCmBagf5/wA+i6SUloraSsIRsw30TBUlcplgNA /Ofw== X-Gm-Message-State: ACgBeo02L/jB0E6Gj8eetAijU21mUJD48lYvX/LQTofFQ0ooyFf1kcoV xktI7IxKG9AI+1pg/ex6qtWaOJWOuBVCEQ== X-Received: by 2002:a17:902:aa98:b0:16c:d74d:fe6c with SMTP id d24-20020a170902aa9800b0016cd74dfe6cmr8527868plr.134.1659729320002; Fri, 05 Aug 2022 12:55:20 -0700 (PDT) Received: from stoup.. ([2602:ae:154e:e201:abf8:e436:f4c:9089]) by smtp.gmail.com with ESMTPSA id h13-20020a170902f70d00b0016f0c2ea158sm3393048plo.157.2022.08.05.12.55.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Aug 2022 12:55:19 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Song Gao , Peter Maydell Subject: [PULL 2/7] hw/loongarch: remove acpi-build.c unused variable 'aml_len' Date: Fri, 5 Aug 2022 12:55:10 -0700 Message-Id: <20220805195515.349768-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220805195515.349768-1-richard.henderson@linaro.org> References: <20220805195515.349768-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1029; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1029.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Song Gao 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 = 0; ^ Reported-by: Peter Maydell Signed-off-by: Song Gao Reviewed-by: Richard Henderson Message-Id: <20220721040046.3985609-1-gaosong@loongson.cn> [rth: Removing aml_len in turn makes fadt set but not used.] Signed-off-by: Richard Henderson --- hw/loongarch/acpi-build.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/hw/loongarch/acpi-build.c b/hw/loongarch/acpi-build.c index 4b4529a3fb..d0f01a6485 100644 --- a/hw/loongarch/acpi-build.c +++ b/hw/loongarch/acpi-build.c @@ -411,9 +411,8 @@ static void acpi_build(AcpiBuildTables *tables, MachineState *machine) LoongArchMachineState *lams = LOONGARCH_MACHINE(machine); GArray *table_offsets; AcpiFadtData fadt_data; - unsigned facs, rsdt, fadt, dsdt; + unsigned facs, rsdt, dsdt; uint8_t *u; - size_t aml_len = 0; GArray *tables_blob = tables->table_data; init_common_fadt_data(&fadt_data); @@ -437,21 +436,13 @@ static void acpi_build(AcpiBuildTables *tables, MachineState *machine) dsdt = tables_blob->len; build_dsdt(tables_blob, tables->linker, machine); - /* - * Count the size of the DSDT, we will need it for - * legacy sizing of ACPI tables. - */ - aml_len += tables_blob->len - dsdt; - /* ACPI tables pointed to by RSDT */ - fadt = tables_blob->len; acpi_add_table(table_offsets, tables_blob); fadt_data.facs_tbl_offset = &facs; fadt_data.dsdt_tbl_offset = &dsdt; fadt_data.xdsdt_tbl_offset = &dsdt; build_fadt(tables_blob, tables->linker, &fadt_data, lams->oem_id, lams->oem_table_id); - aml_len += tables_blob->len - fadt; acpi_add_table(table_offsets, tables_blob); build_madt(tables_blob, tables->linker, lams);