summaryrefslogtreecommitdiff
path: root/src/drivers/usb
diff options
context:
space:
mode:
authorElyes Haouas <ehaouas@noos.fr>2023-07-30 13:16:33 +0200
committerFelix Held <felix-coreboot@felixheld.de>2023-08-01 13:38:48 +0000
commit60a8a7de5a4b96f18692bfe2f472559298628d58 (patch)
tree898e91377f7f5b61e8139eaacf5447d10cef45c4 /src/drivers/usb
parent295f6bf8d4bc93d1aedef218f14c8f20f101a1af (diff)
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 <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/76840 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Diffstat (limited to 'src/drivers/usb')
-rw-r--r--src/drivers/usb/ehci.h2
1 files changed, 1 insertions, 1 deletions
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