From patchwork Mon Apr 14 16:23:23 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 28330 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f199.google.com (mail-ie0-f199.google.com [209.85.223.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 38F2020534 for ; Mon, 14 Apr 2014 16:24:39 +0000 (UTC) Received: by mail-ie0-f199.google.com with SMTP id rl12sf46724063iec.10 for ; Mon, 14 Apr 2014 09:24:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:in-reply-to:references :sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=T+cDzTFla/AQTsAEE6GWA6RKZ6KH4h3nVRvB2yZGbCI=; b=LuodmbBJCTCabw95ELrF/0rY9EqpH/KfXoPKIf+s60wnDwWG+ZWp2y6l/ZY/0vOpqX JMYco4Zd6PW/MarMjBX0oNNSD9Zic/ijdGGrZVW0LkQ48+AaFaHbqy70iRN38cqkRngK cD7RuIU/dWKwqRwe1w7wi9kucxPMhQmya7pt1mB57K8/Ig9ho6oYqDbGcpF3LFZVdBB/ Js1yISmCoTewXklS1v7+3Sr3t8XVQ/4Y5i0/lZSo7TkrmS6Km0CepLqAYDviicY0IC7n PYJ6rhK/NQ0KH8shXFppiTaHg2prrxvUo0UH775NvFSW8xYgNIFASHQzSMRlF20a3S7v sQQQ== X-Gm-Message-State: ALoCoQnsznAiCNnGX9mWZEDkSTFYjNu+N5lJbbuyTcEJS7xQGpI0WUyCgU4P7cqiCJVhv9PwO4VG X-Received: by 10.42.211.15 with SMTP id gm15mr18176600icb.28.1397492678697; Mon, 14 Apr 2014 09:24:38 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.26.119 with SMTP id 110ls2772744qgu.20.gmail; Mon, 14 Apr 2014 09:24:38 -0700 (PDT) X-Received: by 10.58.195.202 with SMTP id ig10mr1008969vec.33.1397492678489; Mon, 14 Apr 2014 09:24:38 -0700 (PDT) Received: from mail-ve0-f172.google.com (mail-ve0-f172.google.com [209.85.128.172]) by mx.google.com with ESMTPS id sq9si2830048vdc.17.2014.04.14.09.24.38 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 14 Apr 2014 09:24:38 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.172 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.172; Received: by mail-ve0-f172.google.com with SMTP id jx11so7917888veb.3 for ; Mon, 14 Apr 2014 09:24:38 -0700 (PDT) X-Received: by 10.221.34.7 with SMTP id sq7mr37282558vcb.5.1397492678399; Mon, 14 Apr 2014 09:24:38 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp162689vcb; Mon, 14 Apr 2014 09:24:37 -0700 (PDT) X-Received: by 10.68.133.229 with SMTP id pf5mr9014016pbb.115.1397492677544; Mon, 14 Apr 2014 09:24:37 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s8si9161860pas.16.2014.04.14.09.24.36; Mon, 14 Apr 2014 09:24:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755261AbaDNQYW (ORCPT + 26 others); Mon, 14 Apr 2014 12:24:22 -0400 Received: from mail-pd0-f182.google.com ([209.85.192.182]:32906 "EHLO mail-pd0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754239AbaDNQYR (ORCPT ); Mon, 14 Apr 2014 12:24:17 -0400 Received: by mail-pd0-f182.google.com with SMTP id y10so8210568pdj.41 for ; Mon, 14 Apr 2014 09:24:16 -0700 (PDT) X-Received: by 10.67.30.168 with SMTP id kf8mr45330005pad.84.1397492656327; Mon, 14 Apr 2014 09:24:16 -0700 (PDT) Received: from localhost ([122.167.126.16]) by mx.google.com with ESMTPSA id eb5sm82443723pad.22.2014.04.14.09.24.10 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 14 Apr 2014 09:24:13 -0700 (PDT) From: Viresh Kumar To: tglx@linutronix.de Cc: linaro-kernel@lists.linaro.org, linux-kernel@vger.kernel.org, fweisbec@gmail.com, Arvind.Chauhan@arm.com, linaro-networking@linaro.org, Viresh Kumar Subject: [PATCH 01/38] tick: align to Coding Guidelines Date: Mon, 14 Apr 2014 21:53:23 +0530 Message-Id: X-Mailer: git-send-email 1.7.12.rc2.18.g61b472e In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: viresh.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.172 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , This does some trivial fixups: - breaking lines longer than 80 columns - merging few lines together - don't break print messages even if they cross 80 columns - remove few whitespaces - remove few extra blank lines Signed-off-by: Viresh Kumar --- include/linux/tick.h | 3 ++- kernel/time/tick-broadcast.c | 16 ++++++---------- kernel/time/tick-internal.h | 5 ++++- kernel/time/tick-oneshot.c | 3 +-- kernel/time/tick-sched.c | 29 ++++++++++++++++------------- 5 files changed, 29 insertions(+), 27 deletions(-) diff --git a/include/linux/tick.h b/include/linux/tick.h index b84773c..8c865fb 100644 --- a/include/linux/tick.h +++ b/include/linux/tick.h @@ -47,7 +47,8 @@ enum tick_nohz_mode { * @idle_waketime: Time when the idle was interrupted * @idle_exittime: Time when the idle state was left * @idle_sleeptime: Sum of the time slept in idle with sched tick stopped - * @iowait_sleeptime: Sum of the time slept in idle with sched tick stopped, with IO outstanding + * @iowait_sleeptime: Sum of the time slept in idle with sched tick stopped, + * with IO outstanding * @sleep_length: Duration of the current idle sleep * @do_timer_lst: CPU was the last one doing do_timer before going idle */ diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c index 64c5990..c4c50ba 100644 --- a/kernel/time/tick-broadcast.c +++ b/kernel/time/tick-broadcast.c @@ -132,7 +132,6 @@ int tick_broadcast_update_freq(struct clock_event_device *dev, u32 freq) return ret; } - static void err_broadcast(const struct cpumask *mask) { pr_crit_once("Failed to broadcast timer tick. Some CPUs may be unresponsive.\n"); @@ -358,8 +357,7 @@ static void tick_do_broadcast_on_off(unsigned long *reason) case CLOCK_EVT_NOTIFY_BROADCAST_FORCE: cpumask_set_cpu(cpu, tick_broadcast_on); if (!cpumask_test_and_set_cpu(cpu, tick_broadcast_mask)) { - if (tick_broadcast_device.mode == - TICKDEV_MODE_PERIODIC) + if (tick_broadcast_device.mode == TICKDEV_MODE_PERIODIC) clockevents_shutdown(dev); } if (*reason == CLOCK_EVT_NOTIFY_BROADCAST_FORCE) @@ -372,8 +370,7 @@ static void tick_do_broadcast_on_off(unsigned long *reason) if (!tick_device_is_functional(dev)) break; if (cpumask_test_and_clear_cpu(cpu, tick_broadcast_mask)) { - if (tick_broadcast_device.mode == - TICKDEV_MODE_PERIODIC) + if (tick_broadcast_device.mode == TICKDEV_MODE_PERIODIC) tick_setup_periodic(dev, 0); } break; @@ -399,8 +396,8 @@ out: void tick_broadcast_on_off(unsigned long reason, int *oncpu) { if (!cpumask_test_cpu(*oncpu, cpu_online_mask)) - printk(KERN_ERR "tick-broadcast: ignoring broadcast for " - "offline CPU #%d\n", *oncpu); + printk(KERN_ERR "tick-broadcast: ignoring broadcast for offline CPU #%d\n", + *oncpu); else tick_do_broadcast_on_off(&reason); } @@ -484,7 +481,6 @@ int tick_resume_broadcast(void) return broadcast; } - #ifdef CONFIG_TICK_ONESHOT static cpumask_var_t tick_broadcast_oneshot_mask; @@ -727,7 +723,8 @@ int tick_broadcast_oneshot_control(unsigned long reason) */ if (!cpumask_test_cpu(cpu, tick_broadcast_force_mask) && dev->next_event.tv64 < bc->next_event.tv64) - tick_broadcast_set_event(bc, cpu, dev->next_event, 1); + tick_broadcast_set_event(bc, cpu, + dev->next_event, 1); } /* * If the current CPU owns the hrtimer broadcast @@ -894,7 +891,6 @@ void tick_broadcast_switch_to_oneshot(void) raw_spin_unlock_irqrestore(&tick_broadcast_lock, flags); } - /* * Remove a dead CPU from broadcasting */ diff --git a/kernel/time/tick-internal.h b/kernel/time/tick-internal.h index 7ab92b1..855c513 100644 --- a/kernel/time/tick-internal.h +++ b/kernel/time/tick-internal.h @@ -87,7 +87,10 @@ static inline void tick_broadcast_setup_oneshot(struct clock_event_device *bc) { BUG(); } -static inline int tick_broadcast_oneshot_control(unsigned long reason) { return 0; } +static inline int tick_broadcast_oneshot_control(unsigned long reason) +{ + return 0; +} static inline void tick_shutdown_broadcast_oneshot(unsigned int *cpup) { } static inline int tick_resume_broadcast_oneshot(struct clock_event_device *bc) { diff --git a/kernel/time/tick-oneshot.c b/kernel/time/tick-oneshot.c index 8241090..e04d5a0 100644 --- a/kernel/time/tick-oneshot.c +++ b/kernel/time/tick-oneshot.c @@ -65,8 +65,7 @@ int tick_switch_to_oneshot(void (*handler)(struct clock_event_device *)) if (!dev || !(dev->features & CLOCK_EVT_FEAT_ONESHOT) || !tick_device_is_functional(dev)) { - printk(KERN_INFO "Clockevents: " - "could not switch to one-shot mode:"); + printk(KERN_INFO "Clockevents: could not switch to one-shot mode:"); if (!dev) { printk(" no tick device\n"); } else { diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index 9f8af69..d48d648 100644 --- a/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c @@ -105,7 +105,6 @@ static ktime_t tick_init_jiffy_update(void) return period; } - static void tick_sched_do_timer(ktime_t now) { int cpu = smp_processor_id(); @@ -245,8 +244,8 @@ void tick_nohz_full_kick_all(void) return; preempt_disable(); - smp_call_function_many(tick_nohz_full_mask, - nohz_full_kick_ipi, NULL, false); + smp_call_function_many(tick_nohz_full_mask, nohz_full_kick_ipi, NULL, + false); tick_nohz_full_kick(); preempt_enable(); } @@ -285,7 +284,8 @@ static int __init tick_nohz_full_setup(char *str) cpu = smp_processor_id(); if (cpumask_test_cpu(cpu, tick_nohz_full_mask)) { - pr_warning("NO_HZ: Clearing %d from nohz_full range for timekeeping\n", cpu); + pr_warning("NO_HZ: Clearing %d from nohz_full range for timekeeping\n", + cpu); cpumask_clear_cpu(cpu, tick_nohz_full_mask); } tick_nohz_full_running = true; @@ -295,8 +295,7 @@ static int __init tick_nohz_full_setup(char *str) __setup("nohz_full=", tick_nohz_full_setup); static int tick_nohz_cpu_down_callback(struct notifier_block *nfb, - unsigned long action, - void *hcpu) + unsigned long action, void *hcpu) { unsigned int cpu = (unsigned long)hcpu; @@ -350,7 +349,8 @@ void __init tick_nohz_init(void) context_tracking_cpu_set(cpu); cpu_notifier(tick_nohz_cpu_down_callback, 0); - cpulist_scnprintf(nohz_full_buf, sizeof(nohz_full_buf), tick_nohz_full_mask); + cpulist_scnprintf(nohz_full_buf, sizeof(nohz_full_buf), + tick_nohz_full_mask); pr_info("NO_HZ: Full dynticks CPUs: %s.\n", nohz_full_buf); } #endif @@ -362,8 +362,8 @@ void __init tick_nohz_init(void) /* * NO HZ enabled ? */ -static int tick_nohz_enabled __read_mostly = 1; -int tick_nohz_active __read_mostly; +static int tick_nohz_enabled __read_mostly = 1; +int tick_nohz_active __read_mostly; /* * Enable / Disable tickless mode */ @@ -407,16 +407,19 @@ static void tick_nohz_update_jiffies(ktime_t now) * Updates the per cpu time idle statistics counters */ static void -update_ts_time_stats(int cpu, struct tick_sched *ts, ktime_t now, u64 *last_update_time) +update_ts_time_stats(int cpu, struct tick_sched *ts, ktime_t now, + u64 *last_update_time) { ktime_t delta; if (ts->idle_active) { delta = ktime_sub(now, ts->idle_entrytime); if (nr_iowait_cpu(cpu) > 0) - ts->iowait_sleeptime = ktime_add(ts->iowait_sleeptime, delta); + ts->iowait_sleeptime = ktime_add(ts->iowait_sleeptime, + delta); else - ts->idle_sleeptime = ktime_add(ts->idle_sleeptime, delta); + ts->idle_sleeptime = ktime_add(ts->idle_sleeptime, + delta); ts->idle_entrytime = now; } @@ -873,7 +876,7 @@ static void tick_nohz_restart_sched_tick(struct tick_sched *ts, ktime_t now) /* * Cancel the scheduled timer and restore the tick */ - ts->tick_stopped = 0; + ts->tick_stopped = 0; ts->idle_exittime = now; tick_nohz_restart(ts, now);