qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v3 3/8] hw/arm/virt-acpi-build: Add power button


From: Shannon Zhao
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
User-agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.4.0

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]