Thread (3 messages) read the whole thread 3 messages, 3 authors, 2021-12-08

Re: [PATCH] carl9170: Use the bitmap API when applicable

From: Kalle Valo <kvalo@kernel.org>
Date: 2021-12-08 08:36:13
Also in: kernel-janitors, lkml, netdev

Christophe JAILLET [off-list ref] wrote:
Use 'bitmap_zalloc()' to simplify code, improve the semantic and avoid some
open-coded arithmetic in allocator arguments.

Note, that this 'bitmap_zalloc()' divides by BITS_PER_LONG the amount of
memory allocated.
The 'roundup()' used to computed the number of needed long should have
been a DIV_ROUND_UP.


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

Use 'bitmap_zero()' to avoid hand writing it.

Signed-off-by: Christophe JAILLET <redacted>
Acked-by: Christian Lamparter <redacted>
Signed-off-by: Kalle Valo <redacted>
Patch applied to ath-next branch of ath.git, thanks.

6273c97296a8 carl9170: Use the bitmap API when applicable

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/1fe18fb73f71d855043c40c83865ad539f326478.1638396221.git.christophe.jaillet@wanadoo.fr/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help