Re: [PATCH 38/49] arch/powerpc: replace cpumask_weight with cpumask_weight_{eq, ...} where appropriate

2022-02-10 Thread Michael Ellerman
Yury Norov writes: > PowerPC code uses cpumask_weight() to compare the weight of cpumask with > a given number. We can do it more efficiently with cpumask_weight_{eq, ...} > because conditional cpumask_weight may stop traversing the cpumask earlier, > as soon as condition is (or can't be) met. >

[PATCH 38/49] arch/powerpc: replace cpumask_weight with cpumask_weight_{eq, ...} where appropriate

2022-02-10 Thread Yury Norov
PowerPC code uses cpumask_weight() to compare the weight of cpumask with a given number. We can do it more efficiently with cpumask_weight_{eq, ...} because conditional cpumask_weight may stop traversing the cpumask earlier, as soon as condition is (or can't be) met. Signed-off-by: Yury Norov --