From nobody Mon Feb 9 11:33:15 2026 Delivered-To: importer@patchew.org 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; Authentication-Results: mx.zohomail.com; dkim=fail; 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; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1585901256; cv=none; d=zohomail.com; s=zohoarc; b=hZoolLvHNfAhukI1lgGCL/NDZJLVaVLaxRIFBFHXVX0V4pzW/TygmSwlch1KNZcQeT7YAG7mm/BXcSR2sgb9YYRLQtczPHjbJegB4L2SXUmMicewePIuJvNVb6KaNeUh0+arYrw5J7Bddb7qDTYGeDIydOMZXgpXTekHfykPyE4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1585901256; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=tDvYI9qnFYs+oXzmsMFgzI0u/pj5+Ditow3Dy4Jt+20=; b=Ai9nFsbVUaGkfX+LgxzEy3mIZG4qQYucEbLMEkZ5YDb2MmZ2p2WakajUUVVocNEYx2bK7jgI/bgxOtdLqmvCi5v9/LST5L6ofOswUGam+KFk3SKDG4Rdi+jQNNvdaSE3pSqSglY3r13iMHHZvNacaWmYZG7KM6z9wayZx6vjEmE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1585901256826227.45005364997257; Fri, 3 Apr 2020 01:07:36 -0700 (PDT) Received: from localhost ([::1]:51734 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jKHMV-0005Cy-FN for importer@patchew.org; Fri, 03 Apr 2020 04:07:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42269) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jKHKJ-0000yX-C4 for qemu-devel@nongnu.org; Fri, 03 Apr 2020 04:05:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jKHKH-0007jZ-NR for qemu-devel@nongnu.org; Fri, 03 Apr 2020 04:05:18 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:23668 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jKHKH-0007f0-J7 for qemu-devel@nongnu.org; Fri, 03 Apr 2020 04:05:17 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-293-5cZRIKHYNvuemUYwUN030w-1; Fri, 03 Apr 2020 04:05:13 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0D98C1005509; Fri, 3 Apr 2020 08:05:12 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-113-60.ams2.redhat.com [10.36.113.60]) by smtp.corp.redhat.com (Postfix) with ESMTP id F080060BF3; Fri, 3 Apr 2020 08:05:03 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 002561750A; Fri, 3 Apr 2020 10:05:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1585901114; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tDvYI9qnFYs+oXzmsMFgzI0u/pj5+Ditow3Dy4Jt+20=; b=H15/WJjG5r/9wIrtTryvNkka2Ogdmdp7PJ3UIAZe61tML/Aez6qNh9uXOqt0DvEVpfFisG 7G/MuAJ9Cd5BC+GA2FDH0wF5IUvBGcTZt8swQOJREUCPTScUBUFLWLlBfif6E5wI+pank3 U1wxksJDgwOL1nGYILnV4Z/wrXSk66Q= X-MC-Unique: 5cZRIKHYNvuemUYwUN030w-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v2 03/12] acpi: drop pointless _STA method Date: Fri, 3 Apr 2020 10:04:53 +0200 Message-Id: <20200403080502.8154-4-kraxel@redhat.com> In-Reply-To: <20200403080502.8154-1-kraxel@redhat.com> References: <20200403080502.8154-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.81 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Eduardo Habkost , qemu-block@nongnu.org, "Michael S. Tsirkin" , Max Reitz , Paolo Bonzini , Gerd Hoffmann , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Igor Mammedov , John Snow , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" When returning a constant there is no point in having a method in the first place, _STA can be a simple integer instead. Signed-off-by: Gerd Hoffmann Reviewed-by: Igor Mammedov --- hw/i386/acpi-build.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 9a19c14e661b..214b98671bf2 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -1151,14 +1151,11 @@ static Aml *build_kbd_device_aml(void) { Aml *dev; Aml *crs; - Aml *method; =20 dev =3D aml_device("KBD"); aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0303"))); =20 - method =3D aml_method("_STA", 0, AML_NOTSERIALIZED); - aml_append(method, aml_return(aml_int(0x0f))); - aml_append(dev, method); + aml_append(dev, aml_name_decl("_STA", aml_int(0xf))); =20 crs =3D aml_resource_template(); aml_append(crs, aml_io(AML_DECODE16, 0x0060, 0x0060, 0x01, 0x01)); @@ -1173,14 +1170,11 @@ static Aml *build_mouse_device_aml(void) { Aml *dev; Aml *crs; - Aml *method; =20 dev =3D aml_device("MOU"); aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0F13"))); =20 - method =3D aml_method("_STA", 0, AML_NOTSERIALIZED); - aml_append(method, aml_return(aml_int(0x0f))); - aml_append(dev, method); + aml_append(dev, aml_name_decl("_STA", aml_int(0xf))); =20 crs =3D aml_resource_template(); aml_append(crs, aml_irq_no_flags(12)); @@ -2238,9 +2232,7 @@ build_dsdt(GArray *table_data, BIOSLinker *linker, TPM_CRB_ADDR_SIZE, AML_READ_WRI= TE)); aml_append(dev, aml_name_decl("_CRS", crs)); =20 - method =3D aml_method("_STA", 0, AML_NOTSERIALIZED); - aml_append(method, aml_return(aml_int(0x0f))); - aml_append(dev, method); + aml_append(dev, aml_name_decl("_STA", aml_int(0xf))); =20 tpm_build_ppi_acpi(tpm, dev); =20 --=20 2.18.2