[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4 12/20] hw/arm/virt-acpi-build: Add PCIe info
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH v4 12/20] hw/arm/virt-acpi-build: Add PCIe info and generate MCFG table |
Date: |
Thu, 9 Apr 2015 17:00:45 +0100 |
On 9 April 2015 at 16:54, Alex Bennée <address@hidden> wrote:
>
> Shannon Zhao <address@hidden> writes:
>
>> From: Shannon Zhao <address@hidden>
>> +build_mcfg(GArray *table_data, GArray *linker, VirtGuestInfo *guest_info)
>> +{
>> + AcpiTableMcfg *mcfg;
>> + acpi_pcie_info *info = guest_info->pcie_info;
>> + int len = sizeof(*mcfg) + 1 * sizeof(mcfg->allocation[0]);
>
> Explicit bracketing around the maths please.
This doesn't seem to make much sense anyway:
if the addition was intended to take precedence
then we're adding 1 to a size-of-a-struct, which is
a bit weird. And if the multiplication was intended
to take precedence then it's doing a pointless multiply
by one. Please can you check that this is actually
calculating the right value?
thanks
-- PMM
- Re: [Qemu-devel] [PATCH v4 04/20] hw/acpi/aml-build: Add aml_memory32_fixed() term, (continued)
[Qemu-devel] [PATCH v4 12/20] hw/arm/virt-acpi-build: Add PCIe info and generate MCFG table, Shannon Zhao, 2015/04/03
[Qemu-devel] [PATCH v4 16/20] hw/acpi/aml-build: Add aml_else() term, Shannon Zhao, 2015/04/03
[Qemu-devel] [PATCH v4 03/20] hw/arm/virt-acpi-build: Basic framework for building ACPI tables on ARM, Shannon Zhao, 2015/04/03