]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum: Use 'bitmap_zalloc()' when applicable
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 24 Oct 2021 19:17:51 +0000 (21:17 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 25 Oct 2021 14:42:24 +0000 (15:42 +0100)
commit0faef913d1e424eaeb8dd63db7e368220a2e4ebb
treed85d8a6839263a69623d8eea3f1d2025b9eee43e
parent44cb90d7421a5de427632e699132acad317dce89
mlxsw: spectrum: Use 'bitmap_zalloc()' when applicable

Use 'bitmap_zalloc()' to simplify code, improve the semantic and avoid
some open-coded arithmetic in allocator arguments.

Also change the corresponding 'kfree()' into 'bitmap_free()' to keep
consistency.

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_acl_atcam.c
drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c
drivers/net/ethernet/mellanox/mlxsw/spectrum_cnt.c
drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c