aboutsummaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorValentin Schneider2022-10-03 16:34:20 +0100
committerYury Norov2022-10-06 05:57:36 -0700
commit585463f0d58aa4d29b744c7c53b222b8028de87f (patch)
tree8d123aa6eb8fcb847287990cab877474cf9243b2 /kernel
parent49937cd12331cc3966b3f8628253fe62fbbd35a1 (diff)
sched/core: Merge cpumask_andnot()+for_each_cpu() into for_each_cpu_andnot()
This removes the second use of the sched_core_mask temporary mask. Suggested-by: Yury Norov <yury.norov@gmail.com> Signed-off-by: Valentin Schneider <vschneid@redhat.com>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sched/core.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index ee28253c9ac0..b4c3112b0095 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -360,10 +360,7 @@ static void __sched_core_flip(bool enabled)
/*
* Toggle the offline CPUs.
*/
- cpumask_copy(&sched_core_mask, cpu_possible_mask);
- cpumask_andnot(&sched_core_mask, &sched_core_mask, cpu_online_mask);
-
- for_each_cpu(cpu, &sched_core_mask)
+ for_each_cpu_andnot(cpu, cpu_possible_mask, cpu_online_mask)
cpu_rq(cpu)->core_enabled = enabled;
cpus_read_unlock();