Skip to content

Commit 87b5a15

Browse files
makelinuxKAGA-KOKO
authored andcommitted
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: 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]
1 parent 59fc20b commit 87b5a15

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

kernel/irq/cpuhotplug.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ static inline bool irq_needs_fixup(struct irq_data *d)
3737
* has been removed from the online mask already.
3838
*/
3939
if (cpumask_any_but(m, cpu) < nr_cpu_ids &&
40-
cpumask_any_and(m, cpu_online_mask) >= nr_cpu_ids) {
40+
!cpumask_intersects(m, cpu_online_mask)) {
4141
/*
4242
* If this happens then there was a missed IRQ fixup at some
4343
* point. Warn about it and enforce fixup.
@@ -110,7 +110,7 @@ static bool migrate_one_irq(struct irq_desc *desc)
110110
if (maskchip && chip->irq_mask)
111111
chip->irq_mask(d);
112112

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

0 commit comments

Comments
 (0)