Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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]

Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Gustavo A. R. Silva and committed by
Herbert Xu
b6f27c0a 994689b8

+3 -1
+3 -1
drivers/crypto/starfive/jh7110-cryp.h
··· 216 216 217 217 struct scatterlist *in_sg; 218 218 struct scatterlist *out_sg; 219 - struct ahash_request ahash_fbk_req; 220 219 size_t total; 221 220 unsigned int blksize; 222 221 unsigned int digsize; 223 222 unsigned long in_sg_len; 224 223 unsigned char *adata; 225 224 u8 rsa_data[STARFIVE_RSA_MAX_KEYSZ] __aligned(sizeof(u32)); 225 + 226 + /* Must be last as it ends in a flexible-array member. */ 227 + struct ahash_request ahash_fbk_req; 226 228 }; 227 229 228 230 struct starfive_cryp_dev *starfive_cryp_find_dev(struct starfive_cryp_ctx *ctx);