[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 06/29] acpi: drop pointless _STA method
From: |
Michael S. Tsirkin |
Subject: |
[PULL 06/29] acpi: drop pointless _STA method |
Date: |
Mon, 4 May 2020 10:29:26 -0400 |
From: Gerd Hoffmann <address@hidden>
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 <address@hidden>
Reviewed-by: Igor Mammedov <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
---
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 23c77eeb95..3a046b03e4 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;
dev = aml_device("KBD");
aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0303")));
- method = 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)));
crs = 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;
dev = aml_device("MOU");
aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0F13")));
- method = 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)));
crs = 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_WRITE));
aml_append(dev, aml_name_decl("_CRS", crs));
- method = 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)));
tpm_build_ppi_acpi(tpm, dev);
--
MST
- [PULL 00/29] virtio,acpi,pci,pc: backlog from pre-5.0, Michael S. Tsirkin, 2020/05/04
- [PULL 01/29] hw/pci/pcie: Forbid hot-plug if it's disabled on the slot, Michael S. Tsirkin, 2020/05/04
- [PULL 02/29] hw/pci/pcie: Replace PCI_DEVICE() casts with existing variable, Michael S. Tsirkin, 2020/05/04
- [PULL 03/29] move 'typedef Aml' to qemu/types.h, Michael S. Tsirkin, 2020/05/04
- [PULL 05/29] qtest: allow DSDT acpi table changes, Michael S. Tsirkin, 2020/05/04
- [PULL 06/29] acpi: drop pointless _STA method,
Michael S. Tsirkin <=
- [PULL 07/29] acpi: add ISADeviceClass->build_aml(), Michael S. Tsirkin, 2020/05/04
- [PULL 08/29] rtc: add RTC_ISA_BASE, Michael S. Tsirkin, 2020/05/04
- [PULL 09/29] virtio-vga: fix virtio-vga bar ordering, Michael S. Tsirkin, 2020/05/04
- [PULL 11/29] vhost-user-blk: fix invalid memory access, Michael S. Tsirkin, 2020/05/04
- [PULL 12/29] checkpatch: fix acpi check with multiple file name, Michael S. Tsirkin, 2020/05/04
- [PULL 13/29] checkpatch: ignore allowed diff list, Michael S. Tsirkin, 2020/05/04
- [PULL 14/29] acpi: DSDT without _STA, Michael S. Tsirkin, 2020/05/04
- [PULL 15/29] hw/acpi/nvdimm: Fix for NVDIMM incorrect DSM output buffer length, Michael S. Tsirkin, 2020/05/04
- [PULL 16/29] nvdimm: Use configurable ACPI IO base and size, Michael S. Tsirkin, 2020/05/04
- [PULL 20/29] bios-tables-test: test pc-dimm and nvdimm coldplug for arm/virt, Michael S. Tsirkin, 2020/05/04