summary refs log tree commit diff stats
path: root/hw/acpi/pci.c
diff options
context:
space:
mode:
authorJonathan Cameron <Jonathan.Cameron@huawei.com>2024-09-16 18:42:37 +0100
committerMichael S. Tsirkin <mst@redhat.com>2024-11-04 16:03:24 -0500
commitcf2181aef23e7f145e8fe7b8395694d32b115ae5 (patch)
treec0c91b82fc63189b1d7eefa08adb8f51324bb6f4 /hw/acpi/pci.c
parenta82fe82916432091ca6fcbd7f357cccf35f6e80d (diff)
downloadfocaccia-qemu-cf2181aef23e7f145e8fe7b8395694d32b115ae5.tar.gz
focaccia-qemu-cf2181aef23e7f145e8fe7b8395694d32b115ae5.zip
hw/acpi: Make storage of node id uint32_t to reduce fragility
>From review of generic port introduction.

The value is handled as a uint32_t so store it in that type.
The value cannot in reality exceed MAX_NODES which is currently
128 but if the types are matched there is no need to rely on that
restriction.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Message-Id: <20240916174237.1843213-1-Jonathan.Cameron@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/acpi/pci.c')
-rw-r--r--hw/acpi/pci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/acpi/pci.c b/hw/acpi/pci.c
index d7a0e91f01..a4835ce563 100644
--- a/hw/acpi/pci.c
+++ b/hw/acpi/pci.c
@@ -72,7 +72,7 @@ typedef struct AcpiGenericInitiator {
 
     /* public */
     char *pci_dev;
-    uint16_t node;
+    uint32_t node;
 } AcpiGenericInitiator;
 
 typedef struct AcpiGenericInitiatorClass {