genirq/affinity: replace cpumask_weight with cpumask_empty where appropriate
authorYury Norov <yury.norov@gmail.com>
Sun, 23 Jan 2022 18:38:51 +0000 (10:38 -0800)
committerYury Norov <yury.norov@gmail.com>
Fri, 3 Jun 2022 13:52:57 +0000 (06:52 -0700)
commit99248e351a2712154d1120ab003d89635c4e8e72
tree23541d56746569584efc0f7ae75da7b6ce8ae375
parentd72002ae67adb1c665e43970685b16645023d639
genirq/affinity: replace cpumask_weight with cpumask_empty where appropriate

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

Signed-off-by: Yury Norov <yury.norov@gmail.com>
kernel/irq/affinity.c