From 60a8a7de5a4b96f18692bfe2f472559298628d58 Mon Sep 17 00:00:00 2001 From: Elyes Haouas Date: Sun, 30 Jul 2023 13:16:33 +0200 Subject: [PATCH] drivers/usb/ehci.h: 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: Ideed4b333632df5068b88dde6f89d3831e3046d1 Signed-off-by: Elyes Haouas Reviewed-on: https://review.coreboot.org/c/coreboot/+/76840 Tested-by: build bot (Jenkins) Reviewed-by: Maximilian Brune Reviewed-by: Felix Singer --- src/drivers/usb/ehci.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/drivers/usb/ehci.h b/src/drivers/usb/ehci.h index b9054cfb1c..3feab86599 100644 --- a/src/drivers/usb/ehci.h +++ b/src/drivers/usb/ehci.h @@ -97,7 +97,7 @@ struct ehci_regs { #define FLAG_CF (1<<0) /* true: we'll support "high speed" */ /* PORTSC: offset 0x44 */ - u32 port_status[0]; /* up to N_PORTS */ + u32 port_status[]; /* up to N_PORTS */ /* EHCI 1.1 addendum */ #define PORTSC_SUSPEND_STS_ACK 0 #define PORTSC_SUSPEND_STS_NYET 1