From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============7735358637117013842==" MIME-Version: 1.0 From: kernel test robot Subject: [PATCH] crypto: fix flexible_array.cocci warnings Date: Fri, 22 Jan 2021 10:24:59 +0800 Message-ID: <20210122022459.GA30065@941617f570d4> In-Reply-To: <202101221042.d63hLZDU-lkp@intel.com> List-Id: To: kbuild@lists.01.org --===============7735358637117013842== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable CC: kbuild-all(a)lists.01.org TO: Megha Dey CC: Kyung Min Park CC: Tomasz Kantecki CC: Herbert Xu CC: Thomas Gleixner CC: Ingo Molnar CC: Borislav Petkov CC: x86(a)kernel.org CC: "H. Peter Anvin" CC: linux-crypto(a)vger.kernel.org From: kernel test robot arch/x86/crypto/aesni-intel_glue.c:90:4-13: WARNING use flexible-array memb= er instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#= zero-length-and-one-element-arrays) Zero-length and one-element arrays are deprecated, see Documentation/process/deprecated.rst Flexible-array members should be used instead. Generated by: scripts/coccinelle/misc/flexible_array.cocci Fixes: 18c54c55949f ("crypto: aesni - AVX512 version of AESNI-GCM using VPC= LMULQDQ") CC: Megha Dey Reported-by: kernel test robot Signed-off-by: kernel test robot --- tree: https://github.com/km13park/linux-1.git master head: 18c54c55949fc48a63e5b8cdcb1e883a5aa490e3 commit: 18c54c55949fc48a63e5b8cdcb1e883a5aa490e3 [7/7] crypto: aesni - AVX5= 12 version of AESNI-GCM using VPCLMULQDQ :::::: branch date: 8 hours ago :::::: commit date: 8 hours ago Please take the patch only if it's a positive warning. Thanks! aesni-intel_glue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/x86/crypto/aesni-intel_glue.c +++ b/arch/x86/crypto/aesni-intel_glue.c @@ -87,7 +87,7 @@ struct gcm_context_data { u64 partial_block_len; u64 unused; /* Allocate space for hash_keys later */ - u8 hash_keys[0]; + u8 hash_keys[]; }; = asmlinkage int aesni_set_key(struct crypto_aes_ctx *ctx, const u8 *in_key, --===============7735358637117013842==--