Skip to content

Commit

Permalink
net: dsa: felix: 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: 23ae3a7 ("net: dsa: felix: add stream gate settings for psfp")
CC: Xiaoliang Yang <xiaoliang.yang_1@nxp.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>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
kernel test robot authored and David S. Miller committed Nov 29, 2021
1 parent ff45b48 commit dcad856
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/dsa/ocelot/felix_vsc9959.c
Original file line number Diff line number Diff line change
Expand Up @@ -1392,7 +1392,7 @@ struct felix_stream_gate {
u64 cycletime;
u64 cycletime_ext;
u32 num_entries;
struct action_gate_entry entries[0];
struct action_gate_entry entries[];
};

struct felix_stream_gate_entry {
Expand Down

0 comments on commit dcad856

Please sign in to comment.