net: switchdev: Simplify 'mlxsw_sp_mc_write_mdb_entry()'
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Wed, 14 Jul 2021 08:32:33 +0000 (10:32 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 16 Jul 2021 17:54:18 +0000 (10:54 -0700)
commita99f030b2488b67a49f44e94f852f2ed9933d552
tree432205632459702d8944c65fee12206a8930ae95
parentf79a3bcb1a50d919147b9f22855d355ed8e03031
net: switchdev: Simplify 'mlxsw_sp_mc_write_mdb_entry()'

Use 'bitmap_alloc()/bitmap_free()' instead of hand-writing it.
This makes the code less verbose.

Also, use 'bitmap_alloc()' instead of 'bitmap_zalloc()' because the bitmap
is fully overridden by a 'bitmap_copy()' call just after its allocation.

While at it, remove an extra and unneeded space.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c