* [PATCH][next] crypto: sun8i-ss - Avoid -Wflex-array-member-not-at-end warning
@ 2025-11-24 9:11 Gustavo A. R. Silva
2025-12-19 6:58 ` Herbert Xu
0 siblings, 1 reply; 2+ messages in thread
From: Gustavo A. R. Silva @ 2025-11-24 9:11 UTC (permalink / raw)
To: Corentin Labbe, Herbert Xu, David S. Miller, Chen-Yu Tsai,
Jernej Skrabec, Samuel Holland
Cc: linux-crypto, linux-arm-kernel, linux-sunxi, linux-kernel,
Gustavo A. R. Silva, linux-hardening
-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 corresponding
structure. Notice that `struct ahash_request` is a flexible structure,
this is a structure that contains a flexible-array member.
With these changes fix the following warning:
drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h:251:30: 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@kernel.org>
---
drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h b/drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h
index ae66eb45fb24..3fc86225edaf 100644
--- a/drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h
+++ b/drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h
@@ -248,9 +248,11 @@ struct sun8i_ss_hash_tfm_ctx {
struct sun8i_ss_hash_reqctx {
struct sginfo t_src[MAX_SG];
struct sginfo t_dst[MAX_SG];
- struct ahash_request fallback_req;
u32 method;
int flow;
+
+ /* Must be last as it ends in a flexible-array member. */
+ struct ahash_request fallback_req;
};
/*
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH][next] crypto: sun8i-ss - Avoid -Wflex-array-member-not-at-end warning
2025-11-24 9:11 [PATCH][next] crypto: sun8i-ss - Avoid -Wflex-array-member-not-at-end warning Gustavo A. R. Silva
@ 2025-12-19 6:58 ` Herbert Xu
0 siblings, 0 replies; 2+ messages in thread
From: Herbert Xu @ 2025-12-19 6:58 UTC (permalink / raw)
To: Gustavo A. R. Silva
Cc: Corentin Labbe, David S. Miller, Chen-Yu Tsai, Jernej Skrabec,
Samuel Holland, linux-crypto, linux-arm-kernel, linux-sunxi,
linux-kernel, linux-hardening
On Mon, Nov 24, 2025 at 06:11:30PM +0900, Gustavo A. R. Silva wrote:
> -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 corresponding
> structure. Notice that `struct ahash_request` is a flexible structure,
> this is a structure that contains a flexible-array member.
>
> With these changes fix the following warning:
>
> drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h:251:30: 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@kernel.org>
> ---
> drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
Patch applied. Thanks.
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-12-19 6:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-24 9:11 [PATCH][next] crypto: sun8i-ss - Avoid -Wflex-array-member-not-at-end warning Gustavo A. R. Silva
2025-12-19 6:58 ` Herbert Xu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox