diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/cpumask.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/cpumask.c b/lib/cpumask.c index 5f627084f2e9..5a70f6196f57 100644 --- a/lib/cpumask.c +++ b/lib/cpumask.c | |||
@@ -16,11 +16,10 @@ | |||
16 | int cpumask_next_and(int n, const struct cpumask *src1p, | 16 | int cpumask_next_and(int n, const struct cpumask *src1p, |
17 | const struct cpumask *src2p) | 17 | const struct cpumask *src2p) |
18 | { | 18 | { |
19 | struct cpumask tmp; | 19 | while ((n = cpumask_next(n, src1p)) < nr_cpu_ids) |
20 | 20 | if (cpumask_test_cpu(n, src2p)) | |
21 | if (cpumask_and(&tmp, src1p, src2p)) | 21 | break; |
22 | return cpumask_next(n, &tmp); | 22 | return n; |
23 | return nr_cpu_ids; | ||
24 | } | 23 | } |
25 | EXPORT_SYMBOL(cpumask_next_and); | 24 | EXPORT_SYMBOL(cpumask_next_and); |
26 | 25 | ||