All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: [PATCH] selftests/bpf: fix flexible_array.cocci warnings
Date: Sat, 22 Jan 2022 16:58:33 +0800	[thread overview]
Message-ID: <20220122085833.GA67205@fba2a898af35> (raw)
In-Reply-To: <202201221618.3iotxtfv-lkp@intel.com>

[-- Attachment #1: Type: text/plain, Size: 1453 bytes --]

CC: kbuild-all(a)lists.01.org
In-Reply-To: <20220114163953.1455836-10-memxor@gmail.com>
References: <20220114163953.1455836-10-memxor@gmail.com>
TO: Kumar Kartikeya Dwivedi <memxor@gmail.com>

From: kernel test robot <lkp@intel.com>

net/bpf/test_run.c:296:6-10: WARNING use flexible-array member 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

CC: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

url:    https://github.com/0day-ci/linux/commits/Kumar-Kartikeya-Dwivedi/Introduce-unstable-CT-lookup-helpers/20220115-004219
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
:::::: branch date: 8 days ago
:::::: commit date: 8 days ago

Please take the patch only if it's a positive warning. Thanks!

 test_run.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/net/bpf/test_run.c
+++ b/net/bpf/test_run.c
@@ -293,7 +293,7 @@ struct prog_test_fail2 {
 struct prog_test_fail3 {
 	int len;
 	char arr1[2];
-	char arr2[0];
+	char arr2[];
 };
 
 noinline void bpf_kfunc_call_test_pass_ctx(struct __sk_buff *skb)

  reply	other threads:[~2022-01-22  8:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-22  9:03 [PATCH bpf-next v8 09/10] selftests/bpf: Extend kfunc selftests kernel test robot
2022-01-22  8:58 ` kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-02-09  2:27 kernel test robot
2022-02-09  2:24 ` [PATCH] selftests/bpf: fix flexible_array.cocci warnings kernel test robot
2022-02-07 20:43 [PATCH bpf-next v8 09/10] selftests/bpf: Extend kfunc selftests kernel test robot
2022-02-07 20:39 ` [PATCH] selftests/bpf: fix flexible_array.cocci warnings kernel test robot
2022-01-26  2:28 [PATCH bpf-next v8 09/10] selftests/bpf: Extend kfunc selftests kernel test robot
2022-01-26  1:10 ` [PATCH] selftests/bpf: fix flexible_array.cocci warnings kernel test robot
2022-01-22  9:25 Julia Lawall
2022-01-22 10:49 ` Kumar Kartikeya Dwivedi
2022-01-18 14:57 [PATCH bpf-next v8 09/10] selftests/bpf: Extend kfunc selftests kernel test robot
2022-01-18 14:53 ` [PATCH] selftests/bpf: fix flexible_array.cocci warnings kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220122085833.GA67205@fba2a898af35 \
    --to=lkp@intel.com \
    --cc=kbuild@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.