summaryrefslogtreecommitdiff
path: root/kernel/sched
diff options
context:
space:
mode:
authorBarry Song <song.bao.hua@hisilicon.com>2021-03-25 15:31:40 +1300
committerIngo Molnar <mingo@kernel.org>2021-03-25 11:41:23 +0100
commit0a2b65c03e9b47493e1442bf9c84badc60d9bffb (patch)
tree7c7c0f12f5832e21470ad61b7e1ac5885bb8d79d /kernel/sched
parentc4681f3f1cfcfde0c95ff72f0bdb43f9ffd7f00e (diff)
sched/topology: Remove redundant cpumask_and() in init_overlap_sched_group()
mask is built in build_balance_mask() by for_each_cpu(i, sg_span), so it must be a subset of sched_group_span(sg). So the cpumask_and() call is redundant - remove it. [ mingo: Adjusted the changelog a bit. ] Signed-off-by: Barry Song <song.bao.hua@hisilicon.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> Reviewed-by: Valentin Schneider <Valentin.Schneider@arm.com> Link: https://lore.kernel.org/r/20210325023140.23456-1-song.bao.hua@hisilicon.com
Diffstat (limited to 'kernel/sched')
-rw-r--r--kernel/sched/topology.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c
index f2066d682cd8..d1aec244c027 100644
--- a/kernel/sched/topology.c
+++ b/kernel/sched/topology.c
@@ -934,7 +934,7 @@ static void init_overlap_sched_group(struct sched_domain *sd,
int cpu;
build_balance_mask(sd, sg, mask);
- cpu = cpumask_first_and(sched_group_span(sg), mask);
+ cpu = cpumask_first(mask);
sg->sgc = *per_cpu_ptr(sdd->sgc, cpu);
if (atomic_inc_return(&sg->sgc->ref) == 1)