crypto: starfive - Avoid -Wflex-array-member-not-at-end warning
Subsystems (2)
PATCH 1/1 crypto: starfive - 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 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/starfive/jh7110-cryp.h:219:49: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
--- drivers/crypto/starfive/jh7110-cryp.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/crypto/starfive/jh7110-cryp.h +3 -1
@@ -216,13 +216,15 @@ struct starfive_cryp_request_ctx {struct scatterlist *in_sg;struct scatterlist *out_sg; -struct ahash_request ahash_fbk_req;size_t total;unsigned int blksize;unsigned int digsize;unsigned long in_sg_len;unsigned char *adata;u8 rsa_data[STARFIVE_RSA_MAX_KEYSZ ]__aligned(sizeof(u32)) ; + +/* Must be last as it ends in a flexible-array member. */ +struct ahash_request ahash_fbk_req; };struct starfive_cryp_dev *starfive_cryp_find_dev (struct starfive_cryp_ctx *ctx);
Signature · 1 line
2.43.0
Herbert Xu
maintainerQuoted 7 lines · Gustavo A. R. Silva
-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_requestis a flexible structure, this is a structure that contains a flexible-array member.
Quoted 8 lines
With these changes fix the following warning:
drivers/crypto/starfive/jh7110-cryp.h:219:49: 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 <[email protected]>--- drivers/crypto/starfive/jh7110-cryp.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
Patch applied. Thanks.
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt