[PATCH 5/5] hw/i386/q35: Include missing 'hw/acpi/acpi.h' header

Philippe Mathieu-Daudé posted 5 patches 8 months, 4 weeks ago
Maintainers: "Michael S. Tsirkin" <mst@redhat.com>, Igor Mammedov <imammedo@redhat.com>, Ani Sinha <anisinha@redhat.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Paolo Bonzini <pbonzini@redhat.com>, Richard Henderson <richard.henderson@linaro.org>, Eduardo Habkost <eduardo@habkost.net>
There is a newer version of this series
[PATCH 5/5] hw/i386/q35: Include missing 'hw/acpi/acpi.h' header
Posted by Philippe Mathieu-Daudé 8 months, 4 weeks ago
"hw/acpi/acpi.h" is implicitly included. Included it
explicitly to avoid when refactoring headers:

hw/i386/pc_q35.c:209:43: error: use of undeclared identifier 'ACPI_PM_PROP_ACPI_PCIHP_BRIDGE'
                              ACPI_PM_PROP_ACPI_PCIHP_BRIDGE,
                              ^

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 hw/i386/pc_q35.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index d346fa3b1d..a91f414922 100644
--- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c
@@ -58,6 +58,7 @@
 #include "hw/hyperv/vmbus-bridge.h"
 #include "hw/mem/nvdimm.h"
 #include "hw/i386/acpi-build.h"
+#include "hw/acpi/acpi.h"
 #include "target/i386/cpu.h"
 
 /* ICH9 AHCI has 6 ports */
-- 
2.41.0


Re: [PATCH 5/5] hw/i386/q35: Include missing 'hw/acpi/acpi.h' header
Posted by Zhao Liu 8 months, 4 weeks ago
Hi Philippe,

On Mon, Feb 19, 2024 at 03:14:11PM +0100, Philippe Mathieu-Daudé wrote:
> Date: Mon, 19 Feb 2024 15:14:11 +0100
> From: Philippe Mathieu-Daudé <philmd@linaro.org>
> Subject: [PATCH 5/5] hw/i386/q35: Include missing 'hw/acpi/acpi.h' header
> X-Mailer: git-send-email 2.41.0
> 
> "hw/acpi/acpi.h" is implicitly included.
> Included it

I'm guessing it's an imperative and shouldn't be in passive form. ;-) So,

s/Included/Include/

> explicitly to avoid when refactoring headers:

s/to avoid/to avoid the following error/

> 
> hw/i386/pc_q35.c:209:43: error: use of undeclared identifier 'ACPI_PM_PROP_ACPI_PCIHP_BRIDGE'
>                               ACPI_PM_PROP_ACPI_PCIHP_BRIDGE,
>                               ^
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>  hw/i386/pc_q35.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
> index d346fa3b1d..a91f414922 100644
> --- a/hw/i386/pc_q35.c
> +++ b/hw/i386/pc_q35.c
> @@ -58,6 +58,7 @@
>  #include "hw/hyperv/vmbus-bridge.h"
>  #include "hw/mem/nvdimm.h"
>  #include "hw/i386/acpi-build.h"
> +#include "hw/acpi/acpi.h"
>  #include "target/i386/cpu.h"

Here it is unordered, and similarly, does it need to be sorted
alphabetically here?

Regards,
Zhao

>  
>  /* ICH9 AHCI has 6 ports */
> -- 
> 2.41.0
> 
> 
Re: [PATCH 5/5] hw/i386/q35: Include missing 'hw/acpi/acpi.h' header
Posted by Philippe Mathieu-Daudé 8 months, 3 weeks ago
On 20/2/24 03:45, Zhao Liu wrote:
> Hi Philippe,
> 
> On Mon, Feb 19, 2024 at 03:14:11PM +0100, Philippe Mathieu-Daudé wrote:
>> Date: Mon, 19 Feb 2024 15:14:11 +0100
>> From: Philippe Mathieu-Daudé <philmd@linaro.org>
>> Subject: [PATCH 5/5] hw/i386/q35: Include missing 'hw/acpi/acpi.h' header
>> X-Mailer: git-send-email 2.41.0
>>
>> "hw/acpi/acpi.h" is implicitly included.
>> Included it
> 
> I'm guessing it's an imperative and shouldn't be in passive form. ;-) So,
> 
> s/Included/Include/
> 
>> explicitly to avoid when refactoring headers:
> 
> s/to avoid/to avoid the following error/

Oops, thanks :)

> 
>>
>> hw/i386/pc_q35.c:209:43: error: use of undeclared identifier 'ACPI_PM_PROP_ACPI_PCIHP_BRIDGE'
>>                                ACPI_PM_PROP_ACPI_PCIHP_BRIDGE,
>>                                ^
>>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>> ---
>>   hw/i386/pc_q35.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
>> index d346fa3b1d..a91f414922 100644
>> --- a/hw/i386/pc_q35.c
>> +++ b/hw/i386/pc_q35.c
>> @@ -58,6 +58,7 @@
>>   #include "hw/hyperv/vmbus-bridge.h"
>>   #include "hw/mem/nvdimm.h"
>>   #include "hw/i386/acpi-build.h"
>> +#include "hw/acpi/acpi.h"
>>   #include "target/i386/cpu.h"
> 
> Here it is unordered, and similarly, does it need to be sorted
> alphabetically here?

It shouldn't hurt ;)