]> Git Repo - J-linux.git/commitdiff
genirq: Use cpumask_intersects()
authorCosta Shulyupin <[email protected]>
Fri, 6 Sep 2024 17:01:40 +0000 (20:01 +0300)
committerThomas Gleixner <[email protected]>
Sun, 8 Sep 2024 14:06:51 +0000 (16:06 +0200)
Replace `cpumask_any_and(a, b) >= nr_cpu_ids` and `cpumask_any_and(a, b) <
nr_cpu_ids` with the more readable `!cpumask_intersects(a, b)` and
`cpumask_intersects(a, b)`

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

index dc94e0bf2c9408e2aefc2094528b47f8f8372ad7..271e9139de77f5348539c95e3463c4fb7585df10 100644 (file)
@@ -198,7 +198,7 @@ __irq_startup_managed(struct irq_desc *desc, const struct cpumask *aff,
 
        irqd_clr_managed_shutdown(d);
 
-       if (cpumask_any_and(aff, cpu_online_mask) >= nr_cpu_ids) {
+       if (!cpumask_intersects(aff, cpu_online_mask)) {
                /*
                 * Catch code which fiddles with enable_irq() on a managed
                 * and potentially shutdown IRQ. Chained interrupt
index 61ca924ef4b4c2d5fff88ba5b85b8993b69698c0..eb150afd671f6de72624d1e686f6226e2b8aee08 100644 (file)
@@ -26,7 +26,7 @@ bool irq_fixup_move_pending(struct irq_desc *desc, bool force_clear)
         * The outgoing CPU might be the last online target in a pending
         * interrupt move. If that's the case clear the pending move bit.
         */
-       if (cpumask_any_and(desc->pending_mask, cpu_online_mask) >= nr_cpu_ids) {
+       if (!cpumask_intersects(desc->pending_mask, cpu_online_mask)) {
                irqd_clr_move_pending(data);
                return false;
        }
@@ -74,7 +74,7 @@ void irq_move_masked_irq(struct irq_data *idata)
         * For correct operation this depends on the caller
         * masking the irqs.
         */
-       if (cpumask_any_and(desc->pending_mask, cpu_online_mask) < nr_cpu_ids) {
+       if (cpumask_intersects(desc->pending_mask, cpu_online_mask)) {
                int ret;
 
                ret = irq_do_set_affinity(data, desc->pending_mask, false);
This page took 0.051439 seconds and 4 git commands to generate.