From: Andrew Morton - Coding style cleanups - Fix bug in modify_acceptable_latency() Cc: Arjan van de Ven Cc: Ingo Molnar Cc: Jesse Barnes Signed-off-by: Andrew Morton --- drivers/acpi/processor_idle.c | 12 +++++++----- kernel/latency.c | 8 ++++---- 2 files changed, 11 insertions(+), 9 deletions(-) diff -puN drivers/acpi/processor_idle.c~maximum-latency-tracking-infrastructure-tidy drivers/acpi/processor_idle.c --- a/drivers/acpi/processor_idle.c~maximum-latency-tracking-infrastructure-tidy +++ a/drivers/acpi/processor_idle.c @@ -466,7 +466,7 @@ static void acpi_processor_idle(void) if (cx->promotion.state && ((cx->promotion.state - pr->power.states) <= max_cstate)) { if (sleep_ticks > cx->promotion.threshold.ticks && - cx->promotion.state->latency <= system_latency_constraint()) { + cx->promotion.state->latency <= system_latency_constraint()) { cx->promotion.count++; cx->demotion.count = 0; if (cx->promotion.count >= @@ -1041,7 +1041,8 @@ static int acpi_processor_power_seq_show "bus master activity: %08x\n" "maximum allowed latency: %d usec\n", pr->power.state ? pr->power.state - pr->power.states : 0, - max_cstate, (unsigned)pr->power.bm_activity, system_latency_constraint()); + max_cstate, (unsigned)pr->power.bm_activity, + system_latency_constraint()); seq_puts(seq, "states:\n"); @@ -1113,9 +1114,10 @@ static void smp_callback(void *v) } /* - * This function gets called when a part of the kernel has a new latency requirement. - * This means we need to get all processors out of their C-state, and then recalculate - * a new suitable C-state. Just do a cross-cpu IPI; that wakes them all right up. + * This function gets called when a part of the kernel has a new latency + * requirement. This means we need to get all processors out of their C-state, + * and then recalculate a new suitable C-state. Just do a cross-cpu IPI; that + * wakes them all right up. */ static int acpi_processor_latency_notify(struct notifier_block *b, unsigned long l, void *v) diff -puN kernel/latency.c~maximum-latency-tracking-infrastructure-tidy kernel/latency.c --- a/kernel/latency.c~maximum-latency-tracking-infrastructure-tidy +++ a/kernel/latency.c @@ -155,9 +155,10 @@ void modify_acceptable_latency(char *ide spin_lock_irqsave(&latency_lock, flags); list_for_each_entry(iter, &latency_list, list) { - if (strcmp(iter->identifier, identifier)==0) + if (strcmp(iter->identifier, identifier) == 0) { iter->usecs = usecs; - break; + break; + } } if (usecs < atomic_read(¤t_max_latency)) atomic_set(¤t_max_latency, usecs); @@ -176,7 +177,6 @@ EXPORT_SYMBOL_GPL(modify_acceptable_late * This function does not sleep and can be called in any context. * Trying to use a non-existing identifier silently gets ignored. */ - void remove_acceptable_latency(char *identifier) { unsigned long flags; @@ -186,7 +186,7 @@ void remove_acceptable_latency(char *ide spin_lock_irqsave(&latency_lock, flags); list_for_each_entry_safe(iter, temp, &latency_list, list) { - if (strcmp(iter->identifier, identifier)==0) { + if (strcmp(iter->identifier, identifier) == 0) { list_del(&iter->list); newmax = iter->usecs; kfree(iter->identifier); _