Skip to content

Commit

Permalink
bpf: Fix flexible_array.cocci warnings
Browse files Browse the repository at this point in the history
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: c1ff181 ("selftests/bpf: Extend kfunc selftests")
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>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Cc: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Link: https://lore.kernel.org/bpf/alpine.DEB.2.22.394.2201221206320.12220@hadrien
  • Loading branch information
kernel test robot authored and Daniel Borkmann committed Jan 24, 2022
1 parent a9921ce commit ed8bb03
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/bpf/test_run.c
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,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)
Expand Down

0 comments on commit ed8bb03

Please sign in to comment.