Merge tag 'mmc-4.1-rc2' of git://git.linaro.org/people/ulf.hansson/mmc
[deliverable/linux.git] / lib / cpumask.c
index 75379b759d3f64e55fbd9cb9768449b08801cbdf..830dd5dec40f1697b2bf2e40a294e05284ded89c 100644 (file)
 int cpumask_next_and(int n, const struct cpumask *src1p,
                     const struct cpumask *src2p)
 {
-       while ((n = cpumask_next(n, src1p)) < nr_cpu_ids)
-               if (cpumask_test_cpu(n, src2p))
-                       break;
-       return n;
+       struct cpumask tmp;
+
+       if (cpumask_and(&tmp, src1p, src2p))
+               return cpumask_next(n, &tmp);
+       return nr_cpu_ids;
 }
 EXPORT_SYMBOL(cpumask_next_and);
 
This page took 0.038367 seconds and 5 git commands to generate.