[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z-R9BcnSzrRv5FX_@kspp>
Date: Wed, 26 Mar 2025 16:17:41 -0600
From: "Gustavo A. R. Silva" <gustavoars@...nel.org>
To: Alan Stern <stern@...land.harvard.edu>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
"Gustavo A. R. Silva" <gustavoars@...nel.org>,
linux-hardening@...r.kernel.org
Subject: [PATCH][next] usb: ehci-fsl: Avoid -Wflex-array-member-not-at-end
warning
-Wflex-array-member-not-at-end was introduced in GCC-14, and we are
getting ready to enable it, globally.
Move the conflicting declaration to the end of the structure. Notice
that `struct ehci_hcd` is a flexible structure --a structure that
contains a flexible-array member.
Fix the following warning:
drivers/usb/host/ehci-fsl.c:414:25: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
Signed-off-by: Gustavo A. R. Silva <gustavoars@...nel.org>
---
drivers/usb/host/ehci-fsl.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c
index 26f13278d4d6..c720d55f4982 100644
--- a/drivers/usb/host/ehci-fsl.c
+++ b/drivers/usb/host/ehci-fsl.c
@@ -411,12 +411,13 @@ static int ehci_fsl_setup(struct usb_hcd *hcd)
}
struct ehci_fsl {
- struct ehci_hcd ehci;
-
#ifdef CONFIG_PM
/* Saved USB PHY settings, need to restore after deep sleep. */
u32 usb_ctrl;
#endif
+
+ /* Must be last --ends in a flexible-array member. */
+ struct ehci_hcd ehci;
};
#ifdef CONFIG_PM
--
2.43.0
Powered by blists - more mailing lists