]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
sched: use group_first_cpu() instead of cpumask_first(sched_group_cpus())
authorMiao Xie <miaox@cn.fujitsu.com>
Wed, 15 Apr 2009 01:59:10 +0000 (09:59 +0800)
committerIngo Molnar <mingo@elte.hu>
Wed, 15 Apr 2009 11:34:07 +0000 (13:34 +0200)
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>
kernel/sched.c

index 92b4b56ad093c4422aad5d4cec0cc566b47a8128..7601ceebf7cee174069827fce58d7f94e5dc4797 100644 (file)
@@ -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.
@@ -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;