Commit 4780dbdb authored by Ido Schimmel's avatar Ido Schimmel Committed by David S. Miller

mlxsw: spectrum_span: Replace zero-length array with flexible-array member

In a similar fashion to commit e99f8e7f ("mlxsw: Replace zero-length
array with flexible-array member"), use a flexible-array member to get a
compiler warning in case the flexible array does not occur last in the
structure.
Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
Reviewed-by: default avatarJiri Pirko <jiri@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4c00dafc
......@@ -22,7 +22,7 @@ struct mlxsw_sp_span {
struct mlxsw_sp *mlxsw_sp;
atomic_t active_entries_count;
int entries_count;
struct mlxsw_sp_span_entry entries[0];
struct mlxsw_sp_span_entry entries[];
};
static void mlxsw_sp_span_respin_work(struct work_struct *work);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment