Commit 87b5a153 authored by Costa Shulyupin's avatar Costa Shulyupin Committed by Thomas Gleixner
Browse files

genirq/cpuhotplug: Use cpumask_intersects()



Replace `cpumask_any_and(a, b) >= nr_cpu_ids`
with the more readable `!cpumask_intersects(a, b)`.

[ tglx: Massaged change log ]

Signed-off-by: default avatarCosta Shulyupin <costa.shul@redhat.com>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Reviewed-by: default avatarMing Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/all/20240904134823.777623-2-costa.shul@redhat.com
parent 59fc20ba
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@ static inline bool irq_needs_fixup(struct irq_data *d)
	 * has been removed from the online mask already.
	 */
	if (cpumask_any_but(m, cpu) < nr_cpu_ids &&
	    cpumask_any_and(m, cpu_online_mask) >= nr_cpu_ids) {
	    !cpumask_intersects(m, cpu_online_mask)) {
		/*
		 * If this happens then there was a missed IRQ fixup at some
		 * point. Warn about it and enforce fixup.
@@ -110,7 +110,7 @@ static bool migrate_one_irq(struct irq_desc *desc)
	if (maskchip && chip->irq_mask)
		chip->irq_mask(d);

	if (cpumask_any_and(affinity, cpu_online_mask) >= nr_cpu_ids) {
	if (!cpumask_intersects(affinity, cpu_online_mask)) {
		/*
		 * If the interrupt is managed, then shut it down and leave
		 * the affinity untouched.