Skip to content

Commit 585463f

Browse files
valschneiderYuryNorov
authored andcommitted
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>
1 parent 49937cd commit 585463f

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

kernel/sched/core.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -360,10 +360,7 @@ static void __sched_core_flip(bool enabled)
360360
/*
361361
* Toggle the offline CPUs.
362362
*/
363-
cpumask_copy(&sched_core_mask, cpu_possible_mask);
364-
cpumask_andnot(&sched_core_mask, &sched_core_mask, cpu_online_mask);
365-
366-
for_each_cpu(cpu, &sched_core_mask)
363+
for_each_cpu_andnot(cpu, cpu_possible_mask, cpu_online_mask)
367364
cpu_rq(cpu)->core_enabled = enabled;
368365

369366
cpus_read_unlock();

0 commit comments

Comments
 (0)