]> Git Repo - J-linux.git/commitdiff
genirq/cpuhotplug: Use cpumask_intersects()
authorCosta Shulyupin <[email protected]>
Wed, 4 Sep 2024 13:48:23 +0000 (16:48 +0300)
committerThomas Gleixner <[email protected]>
Fri, 6 Sep 2024 14:28:39 +0000 (16:28 +0200)
Replace `cpumask_any_and(a, b) >= nr_cpu_ids`
with the more readable `!cpumask_intersects(a, b)`.

[ tglx: Massaged change log ]

Signed-off-by: Costa Shulyupin <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Reviewed-by: Ming Lei <[email protected]>
Link: https://lore.kernel.org/all/[email protected]
kernel/irq/cpuhotplug.c

index eb86283901565bbdf2a80e5dd145365ddb896681..15a7654eff684f06dac92b98e36f2287c017469b 100644 (file)
@@ -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.
This page took 0.054706 seconds and 4 git commands to generate.