From: Andrew Morton Cc: Miguel Ojeda Sandonis Cc: Ingo Molnar Cc: Nick Piggin Signed-off-by: Andrew Morton --- kernel/sched.c | 61 ++++++++++++++++++++++------------------------- 1 file changed, 29 insertions(+), 32 deletions(-) diff -puN kernel/sched.c~kernel-schedc-whitespace-cleanups-more kernel/sched.c --- a/kernel/sched.c~kernel-schedc-whitespace-cleanups-more +++ a/kernel/sched.c @@ -1453,8 +1453,9 @@ static int try_to_wake_up(struct task_st if (this_sd->flags & SD_WAKE_AFFINE) { unsigned long tl = this_load; - unsigned long tl_per_task = - cpu_avg_load_per_task(this_cpu); + unsigned long tl_per_task; + + tl_per_task = cpu_avg_load_per_task(this_cpu); /* * If sync wakeup then subtract the (maximum possible) @@ -3299,7 +3300,7 @@ void fastcall add_preempt_count(int val) * Spinlock count overflowing soon? */ DEBUG_LOCKS_WARN_ON((preempt_count() & PREEMPT_MASK) >= - PREEMPT_MASK - 10); + PREEMPT_MASK - 10); } EXPORT_SYMBOL(add_preempt_count); @@ -5367,19 +5368,19 @@ static void sched_domain_debug(struct sc if (!(sd->flags & SD_LOAD_BALANCE)) { printk("does not load-balance\n"); if (sd->parent) - printk(KERN_ERR "ERROR: " - "!SD_LOAD_BALANCE domain has parent"); + printk(KERN_ERR "ERROR: !SD_LOAD_BALANCE domain" + " has parent"); break; } printk("span %s\n", str); if (!cpu_isset(cpu, sd->span)) - printk(KERN_ERR "ERROR: " - "domain->span does not contain CPU%d\n", cpu); + printk(KERN_ERR "ERROR: domain->span does not contain " + "CPU%d\n", cpu); if (!cpu_isset(cpu, group->cpumask)) - printk(KERN_ERR "ERROR: " - "domain->groups does not contain CPU%d\n", cpu); + printk(KERN_ERR "ERROR: domain->groups does not contain" + " CPU%d\n", cpu); printk(KERN_DEBUG); for (i = 0; i < level + 2; i++) @@ -5394,8 +5395,8 @@ static void sched_domain_debug(struct sc if (!group->cpu_power) { printk("\n"); - printk(KERN_ERR "ERROR: " - "domain->cpu_power not set\n"); + printk(KERN_ERR "ERROR: domain->cpu_power not " + "set\n"); } if (!cpus_weight(group->cpumask)) { @@ -5418,18 +5419,17 @@ static void sched_domain_debug(struct sc printk("\n"); if (!cpus_equal(sd->span, groupmask)) - printk(KERN_ERR "ERROR: " - "groups don't span domain->span\n"); + printk(KERN_ERR "ERROR: groups don't span " + "domain->span\n"); level++; sd = sd->parent; + if (!sd) + continue; - if (sd) { - if (!cpus_subset(groupmask, sd->span)) - printk(KERN_ERR "ERROR: " - "parent span is not a superset of " - "domain->span\n"); - } + if (!cpus_subset(groupmask, sd->span)) + printk(KERN_ERR "ERROR: parent span is not a superset " + "of domain->span\n"); } while (sd); } @@ -5748,8 +5748,9 @@ __setup("max_cache_size=", setup_max_cac */ static void touch_cache(void *__cache, unsigned long __size) { - unsigned long size = __size / sizeof(long), chunk1 = size / 3, - chunk2 = 2 * size / 3; + unsigned long size = __size / sizeof(long); + unsigned long chunk1 = size / 3; + unsigned long chunk2 = 2 * size / 3; unsigned long *cache = __cache; int i; @@ -6041,18 +6042,14 @@ static void calibrate_migration_costs(co -1 #endif ); - if (system_state == SYSTEM_BOOTING) { - if (num_online_cpus() > 1) { - printk("migration_cost="); - for (distance = 0; distance <= max_distance; - distance++) { - if (distance) - printk(","); - printk("%ld", - (long)migration_cost[distance] / 1000); - } - printk("\n"); + if (system_state == SYSTEM_BOOTING && num_online_cpus() > 1) { + printk("migration_cost="); + for (distance = 0; distance <= max_distance; distance++) { + if (distance) + printk(","); + printk("%ld", (long)migration_cost[distance] / 1000); } + printk("\n"); } j1 = jiffies; if (migration_debug) _