]> git.baikalelectronics.ru Git - kernel.git/commit
hv_netvsc: Use bitmap_zalloc() when applicable
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 21 Nov 2021 21:56:39 +0000 (22:56 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 22 Nov 2021 14:32:54 +0000 (14:32 +0000)
commit6f58b1893e75e2c18c3285d760908ccb6d28883a
tree0be24dfa1ef30a7f1014385dc13ca5dd0d59d770
parente9a94c20fe1dcfb86e410b79c8828a6e25025ca6
hv_netvsc: Use bitmap_zalloc() when applicable

'send_section_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.

While at it, change an '== NULL' test into a '!'.

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