]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit9eaa9626a5c309d3592b9085e0a8f73de7b5ee97
tree23541d56746569584efc0f7ae75da7b6ce8ae375
parentcaa5b9c92c630375fd4c741aa276fbee47362424
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