]> git.baikalelectronics.ru Git - kernel.git/commit
octeontx2-pf: replace bitmap_weight with bitmap_empty where appropriate
authorYury Norov <yury.norov@gmail.com>
Sun, 23 Jan 2022 18:38:40 +0000 (10:38 -0800)
committerYury Norov <yury.norov@gmail.com>
Mon, 2 May 2022 13:30:39 +0000 (06:30 -0700)
commitd1b8e876b0267554660f79fcbc148daff6df5ee9
treec541bdc9f154949aa0f99639657e0969bccff623
parent1baa3f52c5c96e2e7116673bc167ae74413665d4
octeontx2-pf: replace bitmap_weight with bitmap_empty where appropriate

In some places, octeontx2 code calls bitmap_weight() to check if any bit of
a given bitmap is set. It's better to use bitmap_empty() in that case
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>
drivers/net/ethernet/marvell/octeontx2/nic/otx2_flows.c
drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c