public inbox for linuxppc-dev@ozlabs.org
 help / color / mirror / Atom feed
* [PATCH 0/2] powerpc: A few misc cpumask refactors
@ 2026-03-27  6:31 Shrikanth Hegde
  2026-03-27  6:31 ` [PATCH 1/2] powerpc: Use cpumask_next_wrap instead Shrikanth Hegde
  2026-03-27  6:31 ` [PATCH 2/2] powerpc: Few misc cpumask code refactors Shrikanth Hegde
  0 siblings, 2 replies; 6+ messages in thread
From: Shrikanth Hegde @ 2026-03-27  6:31 UTC (permalink / raw)
  To: maddy, linuxppc-dev, yury.norov, linux, linux-kernel; +Cc: sshegde, chleroy

While going through the code, spotted these cpumask miscellaneous
changes. These are pure code refactors, they dont affect functionality
or performance. They just use the updated cpumask api and remove some
checks which are not necessary now.

Major one being:
cpu = cpumask_next(cpu, mask)
if (cpu >= nr_cpu_ids)
    cpu = cpumask_first(mask)
Above block can be replaced by cpu = cpumask_next_wrap(cpu, mask)


Note that exact same blocks are still present in:
arch/x86/kernel/tsc_sync.c
drivers/char/random.c
drivers/net/wireguard/queueing.h
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
drivers/net/ethernet/sfc/siena/efx_channels.c
drivers/net/ethernet/sfc/efx_channels.c
kernel/rcu/rcutorture.c

Yury, Rasmus,
Do you think it makes sense to send for the above files too?

Shrikanth Hegde (2):
  powerpc: Use cpumask_next_wrap instead
  powerpc: Few misc cpumask code refactors

 arch/powerpc/kernel/irq.c             |  5 +----
 arch/powerpc/kernel/setup-common.c    |  7 ++-----
 arch/powerpc/mm/book3s64/hash_utils.c |  4 +---
 arch/powerpc/sysdev/xive/common.c     | 12 ++++--------
 4 files changed, 8 insertions(+), 20 deletions(-)

-- 
2.47.3



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-03-29  9:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-27  6:31 [PATCH 0/2] powerpc: A few misc cpumask refactors Shrikanth Hegde
2026-03-27  6:31 ` [PATCH 1/2] powerpc: Use cpumask_next_wrap instead Shrikanth Hegde
2026-03-28 20:44   ` Yury Norov
2026-03-29  9:18     ` Shrikanth Hegde
2026-03-27  6:31 ` [PATCH 2/2] powerpc: Few misc cpumask code refactors Shrikanth Hegde
2026-03-28 20:27   ` Yury Norov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox