All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] selftests/bpf: fix flexible_array.cocci warnings
  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
  0 siblings, 0 replies; 8+ messages in thread
From: kernel test robot @ 2022-01-22  8:58 UTC (permalink / raw)
  To: kbuild

[-- 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)

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH bpf-next v8 09/10] selftests/bpf: Extend kfunc selftests
@ 2022-01-22  9:03 kernel test robot
  2022-01-22  8:58 ` [PATCH] selftests/bpf: fix flexible_array.cocci warnings kernel test robot
  0 siblings, 1 reply; 8+ messages in thread
From: kernel test robot @ 2022-01-22  9:03 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 1325 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>

Hi Kumar,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on bpf-next/master]

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
config: x86_64-randconfig-c022-20220117 (https://download.01.org/0day-ci/archive/20220122/202201221618.3iotxtfv-lkp(a)intel.com/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Julia Lawall <julia.lawall@lip6.fr>


cocci warnings: (new ones prefixed by >>)
>> 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)

Please review and possibly fold the followup patch.

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH] selftests/bpf: fix flexible_array.cocci warnings
  2022-02-09  2:27 [PATCH bpf-next v8 09/10] selftests/bpf: Extend kfunc selftests kernel test robot
@ 2022-02-09  2:24 ` kernel test robot
  0 siblings, 0 replies; 8+ messages in thread
From: kernel test robot @ 2022-02-09  2:24 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 1455 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: 4 weeks ago
:::::: commit date: 4 weeks 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)

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH] selftests/bpf: fix flexible_array.cocci warnings
  2022-02-07 20:43 [PATCH bpf-next v8 09/10] selftests/bpf: Extend kfunc selftests kernel test robot
@ 2022-02-07 20:39 ` kernel test robot
  0 siblings, 0 replies; 8+ messages in thread
From: kernel test robot @ 2022-02-07 20:39 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 1455 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: 3 weeks ago
:::::: commit date: 3 weeks 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)

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH] selftests/bpf: fix flexible_array.cocci warnings
  2022-01-26  2:28 [PATCH bpf-next v8 09/10] selftests/bpf: Extend kfunc selftests kernel test robot
@ 2022-01-26  1:10 ` kernel test robot
  0 siblings, 0 replies; 8+ messages in thread
From: kernel test robot @ 2022-01-26  1:10 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 1455 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: 11 days ago
:::::: commit date: 11 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)

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] selftests/bpf: fix flexible_array.cocci warnings
  2022-01-22  9:25 Julia Lawall
@ 2022-01-22 10:49 ` Kumar Kartikeya Dwivedi
  0 siblings, 0 replies; 8+ messages in thread
From: Kumar Kartikeya Dwivedi @ 2022-01-22 10:49 UTC (permalink / raw)
  To: kbuild-all

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

On Sat, 22 Jan 2022 at 14:55, Julia Lawall <julia.lawall@inria.fr> wrote:
>
> From: kernel test robot <lkp@intel.com>
>
> 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>
> Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
> ---
>
> 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
>
> Since this is a test, I don't know if you want to change it.

We can definitely change it. It is just used for testing a type check
in the verifier. Please resend this to bpf(a)vger.kernel.org, with
[PATCH bpf-next] in subject, and use bpf: as prefix instead of
selftests/bpf:, and add a Fixes: tag for the commit in bpf-next
introducing it

Fixes: c1ff181ffabc ("selftests/bpf: Extend kfunc selftests")

>
>  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)

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH] selftests/bpf: fix flexible_array.cocci warnings
@ 2022-01-22  9:25 Julia Lawall
  2022-01-22 10:49 ` Kumar Kartikeya Dwivedi
  0 siblings, 1 reply; 8+ messages in thread
From: Julia Lawall @ 2022-01-22  9:25 UTC (permalink / raw)
  To: kbuild-all

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

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

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>
Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
---

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

Since this is a test, I don't know if you want to change it.

 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)

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH] selftests/bpf: fix flexible_array.cocci warnings
  2022-01-18 14:57 [PATCH bpf-next v8 09/10] selftests/bpf: Extend kfunc selftests kernel test robot
@ 2022-01-18 14:53 ` kernel test robot
  0 siblings, 0 replies; 8+ messages in thread
From: kernel test robot @ 2022-01-18 14:53 UTC (permalink / raw)
  To: kbuild

[-- 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: 4 days ago
:::::: commit date: 4 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)

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-02-09  2:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-22  9:03 [PATCH bpf-next v8 09/10] selftests/bpf: Extend kfunc selftests kernel test robot
2022-01-22  8:58 ` [PATCH] selftests/bpf: fix flexible_array.cocci warnings kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2022-02-09  2:27 [PATCH bpf-next v8 09/10] selftests/bpf: Extend kfunc selftests 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

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.