mirror_ubuntu-kernels/drivers/net/wireless/ath/carl9170
Christophe JAILLET 6273c97296 carl9170: Use the bitmap API when applicable
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 <christophe.jaillet@wanadoo.fr>
Acked-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/1fe18fb73f71d855043c40c83865ad539f326478.1638396221.git.christophe.jaillet@wanadoo.fr
2021-12-08 10:35:56 +02:00
..
carl9170.h carl9170: remove get_tid_h 2021-04-18 09:35:43 +03:00
cmd.c
cmd.h
debug.c carl9170: remove trailing semicolon in macro definition 2020-12-08 09:45:36 +02:00
debug.h
eeprom.h
fw.c carl9170: remove P2P_GO support 2020-05-06 09:14:20 +03:00
fwcmd.h carl9170: fix struct alignment conflict 2021-02-09 09:24:20 +02:00
fwdesc.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 325 2019-06-05 17:37:06 +02:00
hw.h carl9170: Replace zero-length array with flexible-array 2020-05-12 10:31:49 +03:00
Kconfig wireless: carl9170: fix LEDS build errors & warnings 2021-06-12 13:37:46 +03:00
led.c
mac.c carl9170: remove WDS code 2020-11-11 08:39:13 +01:00
main.c carl9170: Use the bitmap API when applicable 2021-12-08 10:35:56 +02:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
phy.c
phy.h
rx.c carl9170: Use fallthrough pseudo-keyword 2020-08-27 13:20:26 +03:00
tx.c carl9170: remove get_tid_h 2021-04-18 09:35:43 +03:00
usb.c carl9170: convert tasklets to use new tasklet_setup() API 2020-08-27 13:21:34 +03:00
version.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
wlan.h carl9170: fix struct alignment conflict 2021-02-09 09:24:20 +02:00