]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
crypto: sun8i-ss - Avoid -Wflex-array-member-not-at-end warning
authorGustavo A. R. Silva <gustavoars@kernel.org>
Mon, 24 Nov 2025 09:11:30 +0000 (18:11 +0900)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 19 Dec 2025 06:47:47 +0000 (14:47 +0800)
-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>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h

index ae66eb45fb24647198ad224c80c88ccccd511b73..3fc86225edaf3604bfb145c181f7390f1e63f473 100644 (file)
@@ -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;
 };
 
 /*