]> git.baikalelectronics.ru Git - kernel.git/commit
qed: replace bitmap_weight with bitmap_empty in qed_roce_stop()
authorYury Norov <yury.norov@gmail.com>
Wed, 9 Feb 2022 23:54:34 +0000 (15:54 -0800)
committerYury Norov <yury.norov@gmail.com>
Mon, 2 May 2022 13:30:40 +0000 (06:30 -0700)
commitd0139dcf84e2df70e98ea526212f60043eaa3a9c
treeb5deea1c01c92227027f60385ce72282c53d88fd
parent852aa69a90509aa1df4b44cd68acbb8ccefcad04
qed: replace bitmap_weight with bitmap_empty in qed_roce_stop()

qed_roce_stop() calls bitmap_weight() to check if any bit of a given
bitmap is set. We can do it more efficiently with bitmap_empty() because
bitmap_empty() stops traversing the bitmap as soon as it finds first set
bit, while bitmap_weight() counts all bits unconditionally.

Signed-off-by: Yury Norov <yury.norov@gmail.com>
Acked-by: Prabhakar Kushwaha <pkushwaha@marvell.com>
drivers/net/ethernet/qlogic/qed/qed_roce.c