]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_span: Use struct_size() to simplify allocation
authorIdo Schimmel <idosch@mellanox.com>
Thu, 20 Feb 2020 07:07:49 +0000 (09:07 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 20 Feb 2020 18:04:33 +0000 (10:04 -0800)
commit0d7009fb78062172f40361ac2cee5c839e0eab9a
treef334aebb8e243593f742729b44471a5329760eee
parentce4ac55c8035929ef7be6d39bb3c4c5a500bf8df
mlxsw: spectrum_span: Use struct_size() to simplify allocation

Allocate the main mirroring struct and the individual structs for the
different mirroring agents in a single allocation.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c