From: Shannon Zhao <zhaoshenglong@huawei.com>
To: Igor Mammedov <imammedo@redhat.com>
Cc: wei@redhat.com, peter.maydell@linaro.org,
graeme.gregory@linaro.org, mst@redhat.com, qemu-devel@nongnu.org,
peter.huangpeng@huawei.com, qemu-arm@nongnu.org,
shannon.zhao@linaro.org
Subject: Re: [Qemu-devel] [PATCH v3 3/8] hw/arm/virt-acpi-build: Add power button device in ACPI DSDT table
Date: Tue, 1 Dec 2015 21:12:56 +0800 [thread overview]
Message-ID: <565D9CD8.1090605@huawei.com> (raw)
In-Reply-To: <20151201140532.340805f8@nial.brq.redhat.com>
Hi Igor,
On 2015/12/1 21:05, Igor Mammedov wrote:
>>>>> +static void acpi_dsdt_add_power_button(Aml *scope)
>>>>> > >> > +{
>>>>> > >> > + Aml *dev = aml_device("PWRB");
>>>>> > >> > + aml_append(dev, aml_name_decl("_HID", aml_string("PNP0C0C")));
>>>>> > >> > + aml_append(dev, aml_name_decl("_ADR", aml_int(0)));
>>>>> > >> > + aml_append(dev, aml_name_decl("_UID", aml_int(0)));
>>>>> > >> > + Aml *method = aml_method("_STA", 0);
>>>>> > >> > + aml_append(method, aml_return(aml_int(0x0F)));
>>>>> > >> > + aml_append(dev, method);
>>> > > since _STA always returns 0xF you can just drop it altogether,
>>> > > as _STA == 0xF is implied if it's not present.
>>> > >
>> >
>> > Yes, but I think adding this is harmless and make the return value explicit.
> It's useless and consumes several bytes, it's better to drop it unless you have to have it.
>
Sure, will drop it. :)
BTW, could you have a look at other ACPI patches in this series? Thanks
in advance!
--
Shannon
next prev parent reply other threads:[~2015-12-01 13:13 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-16 13:23 [Qemu-devel] [PATCH v3 0/8] Add system_powerdown support on ARM for ACPI and DT shannon.zhao
2015-11-16 13:23 ` [Qemu-devel] [PATCH v3 1/8] hw/arm/virt: Add a GPIO controller shannon.zhao
2015-12-01 13:21 ` Igor Mammedov
2015-12-01 13:49 ` Peter Maydell
2015-12-01 14:48 ` Pavel Fedin
2015-12-01 15:25 ` Shannon Zhao
2015-12-01 15:29 ` Wei Huang
2015-12-02 9:39 ` [Qemu-devel] [Qemu-arm] " Pavel Fedin
2015-11-16 13:23 ` [Qemu-devel] [PATCH v3 2/8] hw/arm/virt-acpi-build: Add GPIO controller in ACPI DSDT table shannon.zhao
2015-11-16 13:23 ` [Qemu-devel] [PATCH v3 3/8] hw/arm/virt-acpi-build: Add power button device " shannon.zhao
2015-12-01 11:41 ` Igor Mammedov
2015-12-01 12:43 ` Shannon Zhao
2015-12-01 13:05 ` Igor Mammedov
2015-12-01 13:12 ` Shannon Zhao [this message]
2015-11-16 13:23 ` [Qemu-devel] [PATCH v3 4/8] hw/acpi/aml-build: Add GPIO Connection Descriptor shannon.zhao
2015-12-03 15:15 ` Igor Mammedov
2015-11-16 13:23 ` [Qemu-devel] [PATCH v3 5/8] hw/acpi/aml-build: Add a wrapper for GPIO Interrupt Connection shannon.zhao
2015-12-03 15:34 ` Igor Mammedov
2015-12-03 15:37 ` Igor Mammedov
2015-11-16 13:23 ` [Qemu-devel] [PATCH v3 6/8] hw/arm/virt-acpi-build: Add _E03 for Power Button shannon.zhao
2015-12-04 14:10 ` Igor Mammedov
2015-12-07 7:10 ` Shannon Zhao
2015-11-16 13:23 ` [Qemu-devel] [PATCH v3 7/8] hw/arm/virt: Add QEMU powerdown notifier and hook it to GPIO Pin 3 shannon.zhao
2015-11-16 13:23 ` [Qemu-devel] [PATCH v3 8/8] hw/arm/virt: Add gpio-keys node for Poweroff using DT shannon.zhao
2015-11-27 17:16 ` Peter Maydell
2015-11-28 3:06 ` Shannon Zhao
2015-11-17 1:37 ` [Qemu-devel] [PATCH v3 0/8] Add system_powerdown support on ARM for ACPI and DT Shannon Zhao
2015-12-01 13:43 ` Igor Mammedov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=565D9CD8.1090605@huawei.com \
--to=zhaoshenglong@huawei.com \
--cc=graeme.gregory@linaro.org \
--cc=imammedo@redhat.com \
--cc=mst@redhat.com \
--cc=peter.huangpeng@huawei.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=shannon.zhao@linaro.org \
--cc=wei@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).