mlxsw: spectrum_span: Replace zero-length array with flexible-array member
In a similar fashion to commit e99f8e7f88
("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: Ido Schimmel <idosch@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
4c00dafc59
commit
4780dbdbd9
|
@ -22,7 +22,7 @@ struct mlxsw_sp_span {
|
||||||
struct mlxsw_sp *mlxsw_sp;
|
struct mlxsw_sp *mlxsw_sp;
|
||||||
atomic_t active_entries_count;
|
atomic_t active_entries_count;
|
||||||
int 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);
|
static void mlxsw_sp_span_respin_work(struct work_struct *work);
|
||||||
|
|
Loading…
Reference in New Issue