Skip to content
Commit 95ed57c7 authored by Yury Norov's avatar Yury Norov Committed by Will Deacon
Browse files

perf: replace bitmap_weight with bitmap_empty where appropriate



In some places, drivers/perf 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: default avatarYury Norov <yury.norov@gmail.com>
Acked-by: Mark Rutland's avatarMark Rutland <mark.rutland@arm.com>
Link: https://lore.kernel.org/r/20220210224933.379149-13-yury.norov@gmail.com


Signed-off-by: default avatarWill Deacon <will@kernel.org>
parent 602c873e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment