summaryrefslogtreecommitdiff
path: root/src/include/acpi/acpi.h
diff options
context:
space:
mode:
authorElyes Haouas <ehaouas@noos.fr>2023-07-30 12:59:50 +0200
committerJakub Czapiga <jacz@semihalf.com>2023-08-01 12:55:42 +0000
commita4aa169aab5a621edaabb6b40d1b761bdb92b1f2 (patch)
tree00c8fb32cb04447afc571926448104592b316b2a /src/include/acpi/acpi.h
parent408232e4bfcdc33bbec9b866569ff6aea11ba9ec (diff)
include/acpi: Use C99 flexible arrays
Use C99 flexible arrays instead of older style of one-element or zero-length arrays. It allows the compiler to generate errors when the flexible array does not occur at the end in the structure. Change-Id: I3d5838b825c6ac2a2959388381004993024081c3 Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/76813 Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/include/acpi/acpi.h')
-rw-r--r--src/include/acpi/acpi.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/include/acpi/acpi.h b/src/include/acpi/acpi.h
index f1c52d1560..0aa8026651 100644
--- a/src/include/acpi/acpi.h
+++ b/src/include/acpi/acpi.h
@@ -506,7 +506,7 @@ typedef struct acpi_ivrs_ivhd {
uint16_t pci_segment_group;
uint16_t iommu_info;
uint32_t iommu_feature_info;
- uint8_t entry[0];
+ uint8_t entry[];
} __packed acpi_ivrs_ivhd_t;
/* IVRS (I/O Virtualization Reporting Structure) Type 10h */
@@ -549,7 +549,7 @@ typedef struct acpi_ivrs_ivhd_11 {
uint32_t efr_reg_image_low;
uint32_t efr_reg_image_high;
uint32_t reserved[2];
- uint8_t entry[0];
+ uint8_t entry[];
} __packed acpi_ivrs_ivhd11_t;
enum dev_scope_type {
@@ -569,7 +569,7 @@ typedef struct dev_scope {
struct {
u8 dev;
u8 fn;
- } __packed path[0];
+ } __packed path[];
} __packed dev_scope_t;
enum dmar_type {
@@ -651,7 +651,7 @@ typedef struct acpi_dmar {
u8 host_address_width;
u8 flags;
u8 reserved[10];
- dmar_entry_t structure[0];
+ dmar_entry_t structure[];
} __packed acpi_dmar_t;
/* MADT: APIC Structure Types */
@@ -1246,7 +1246,7 @@ typedef struct acpi_einj_trigger_table {
u32 revision;
u32 table_size;
u32 entry_count;
- acpi_einj_action_table_t trigger_action[1];
+ acpi_einj_action_table_t trigger_action[];
} __packed acpi_einj_trigger_table_t;
typedef struct set_error_type {