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

From: Michael Ellerman
Date: Thu Feb 10 2022 - 23:10:31 EST


Yury Norov <yury.norov@xxxxxxxxx> 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.
>
> Signed-off-by: Yury Norov <yury.norov@xxxxxxxxx>
> ---
> arch/powerpc/kernel/smp.c | 2 +-
> arch/powerpc/kernel/watchdog.c | 2 +-
> arch/powerpc/xmon/xmon.c | 4 ++--
> 3 files changed, 4 insertions(+), 4 deletions(-)

Acked-by: Michael Ellerman <mpe@xxxxxxxxxxxxxx>

cheers