qed: Use the bitmap API to simplify some functions
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 21 Nov 2021 19:12:54 +0000 (20:12 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 22 Nov 2021 14:30:57 +0000 (14:30 +0000)
commit5e6c7ccd3ea4b25dd6b4b0363859913f315deacb
tree9cd6b189dea63dc7e9cd1d9293f6cfa4acd7f879
parent08a7abf4aff1a42290fd20ff7a5fa8a3ff5f90e7
qed: Use the bitmap API to simplify some functions

'cid_map' is a bitmap. So 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.

Also change some 'memset()' into 'bitmap_zero()' to keep consistency. This
is also much less verbose.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/qed/qed_cxt.c