OSDN Git Service

net: spider_net: Use non-atomic bitmap API when applicable
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sat, 27 Nov 2021 15:18:59 +0000 (16:18 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 2 Dec 2021 02:45:46 +0000 (18:45 -0800)
commit699e53e4fab3a37d3538c4177389a54b1e6a24e2
tree7123a5b1beec306da9be50348c15bba46672b63c
parent10184da91666e3f37fb2ddb722239097b55cc0a2
net: spider_net: Use non-atomic bitmap API when applicable

No concurrent access is possible when a bitmap is local to a function.
So prefer the non-atomic functions to save a few cycles.
   - replace a 'for' loop by an equivalent non-atomic 'bitmap_fill()' call
   - use '__set_bit()'

While at it, clear the 'bitmask' bitmap only when needed.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/3de0792f5088f00d135c835df6c19e63ae95f5d2.1638026251.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/toshiba/spider_net.c