Skip to content

Commit

Permalink
sched: use group_first_cpu() instead of cpumask_first(sched_group_cpu…
Browse files Browse the repository at this point in the history
…s())

Impact: cleanup

This patch changes cpumask_first(sched_group_cpus()) to group_first_cpu()
for maintainability.

Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Miao Xie authored and Ingo Molnar committed Apr 15, 2009
1 parent 78ddb08 commit 13318a7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -7995,7 +7995,7 @@ static void init_numa_sched_groups_power(struct sched_group *group_head)
struct sched_domain *sd;

sd = &per_cpu(phys_domains, j).sd;
if (j != cpumask_first(sched_group_cpus(sd->groups))) {
if (j != group_first_cpu(sd->groups)) {
/*
* Only add "power" once for each
* physical package.
Expand Down Expand Up @@ -8073,7 +8073,7 @@ static void init_sched_groups_power(int cpu, struct sched_domain *sd)

WARN_ON(!sd || !sd->groups);

if (cpu != cpumask_first(sched_group_cpus(sd->groups)))
if (cpu != group_first_cpu(sd->groups))
return;

child = sd->child;
Expand Down

0 comments on commit 13318a7

Please sign in to comment.