mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Viresh Kumar <viresh.kumar@linaro.org>
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 <viresh.kumar@linaro.org>
Subject: [PATCH 01/38] tick: align to Coding Guidelines
Date: Mon, 14 Apr 2014 21:53:23 +0530	[thread overview]
Message-ID: <ce2b4fe3fa2e5be273017834412a197d653518e3.1397492345.git.viresh.kumar@linaro.org> (raw)
In-Reply-To: <cover.1397492345.git.viresh.kumar@linaro.org>
In-Reply-To: <cover.1397492345.git.viresh.kumar@linaro.org>

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 <viresh.kumar@linaro.org>
---
 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);
-- 
1.7.12.rc2.18.g61b472e


  reply	other threads:[~2014-04-14 16:24 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-14 16:23 [PATCH 00/38] tick cleanups and bugfixes Viresh Kumar
2014-04-14 16:23 ` Viresh Kumar [this message]
2014-04-14 16:23 ` [PATCH 02/38] tick: update doc comments for struct tick_sched Viresh Kumar
2014-04-14 16:23 ` [PATCH 03/38] tick: rearrange members of 'struct tick_sched' Viresh Kumar
2014-04-14 16:23 ` [PATCH 04/38] tick: move declaration of tick_cpu_device to tick.h Viresh Kumar
2014-04-14 16:23 ` [PATCH 05/38] tick: move definition of tick_get_device() " Viresh Kumar
2014-04-14 16:23 ` [PATCH 06/38] tick: create tick_get_cpu_device() to get tick_cpu_device on this cpu Viresh Kumar
2014-04-14 16:23 ` [PATCH 07/38] tick-oneshot: drop local_irq_save/restore from tick_switch_to_oneshot() Viresh Kumar
2014-04-14 16:23 ` [PATCH 08/38] tick-oneshot: move tick_is_oneshot_available() to tick-oneshot.c Viresh Kumar
2014-04-14 16:23 ` [PATCH 09/38] tick-oneshot: remove tick_resume_oneshot() Viresh Kumar
2014-04-14 16:23 ` [PATCH 10/38] tick-common: remove extra checks from tick_check_new_device() Viresh Kumar
2014-04-14 16:23 ` [PATCH 11/38] tick-common: fix wrong check in tick_check_replacement() Viresh Kumar
2014-04-14 16:23 ` [PATCH 12/38] tick-common: call tick_check_percpu() from tick_check_preferred() Viresh Kumar
2014-04-14 16:23 ` [PATCH 13/38] tick-common: don't check tick_oneshot_mode_active() " Viresh Kumar
2014-04-14 16:23 ` [PATCH 14/38] tick-common: do additional checks in tick_check_preferred() Viresh Kumar
2014-04-14 16:23 ` [PATCH 15/38] tick-common: remove tick_check_replacement() Viresh Kumar
2014-04-14 16:23 ` [PATCH 16/38] tick-common: don't pass cpumask to tick_setup_device() Viresh Kumar
2014-04-14 16:23 ` [PATCH 17/38] tick-common: call tick_install_replacement() from tick_check_new_device() Viresh Kumar
2014-04-14 16:23 ` [PATCH 18/38] tick-common: don't set mode to CLOCK_EVT_MODE_UNUSED in tick_shutdown() Viresh Kumar
2014-04-14 19:38   ` Stephen Boyd
2014-04-15  3:45     ` Viresh Kumar
2014-04-14 16:23 ` [PATCH 19/38] tick-common: remove local variable 'broadcast' from tick_resume() Viresh Kumar
2014-04-14 16:23 ` [PATCH 20/38] tick-sched: initialize 'cpu' while defining it in tick_nohz_full_setup() Viresh Kumar
2014-04-14 16:23 ` [PATCH 21/38] tick-sched: no need to rewrite '1' to tick_nohz_enabled Viresh Kumar
2014-04-14 16:23 ` [PATCH 22/38] tick-sched: no need to recheck cpu_online() in can_stop_idle_tick() Viresh Kumar
2014-04-14 19:52   ` Stephen Boyd
2014-04-15  3:55     ` Viresh Kumar
2014-04-14 16:23 ` [PATCH 23/38] tick-sched: invert parameter of tick_check_oneshot_change() Viresh Kumar
2014-04-14 16:23 ` [PATCH 24/38] tick-sched: don't check tick_nohz_full_cpu() in __tick_nohz_task_switch() Viresh Kumar
2014-04-14 23:08   ` Frederic Weisbecker
2014-04-14 16:23 ` [PATCH 25/38] tick-sched: don't call local_softirq_pending() thrice in can_stop_idle_tick() Viresh Kumar
2014-04-14 16:23 ` [PATCH 26/38] tick-sched: don't call update_wall_time() when delta is lesser than tick_period Viresh Kumar
2014-04-14 16:23 ` [PATCH 27/38] tick-sched: remove 'regs' parameter of tick_sched_handle() Viresh Kumar
2014-04-14 16:23 ` [PATCH 28/38] tick-sched: remove parameters to {__}tick_nohz_task_switch() routines Viresh Kumar
2014-04-14 23:14   ` Frederic Weisbecker
2014-04-14 16:23 ` [PATCH 29/38] tick-sched: remove wrapper around __tick_nohz_task_switch() Viresh Kumar
2014-04-14 23:22   ` Frederic Weisbecker
2014-04-15  4:45     ` Viresh Kumar
2014-04-15  9:13       ` Frederic Weisbecker
2014-04-15  9:53         ` Viresh Kumar
2014-04-15 12:44           ` Frederic Weisbecker
2014-04-16  5:43             ` Viresh Kumar
2014-04-14 16:23 ` [PATCH 30/38] tick-sched: move nohz_full_buf[] inside tick_nohz_init() Viresh Kumar
2014-04-14 23:28   ` Frederic Weisbecker
2014-04-15  4:01     ` Viresh Kumar
2014-04-14 16:23 ` [PATCH 31/38] tick-sched: initialize 'ts' during its definition __tick_nohz_idle_enter() Viresh Kumar
2014-04-14 16:23 ` [PATCH 32/38] tick-sched: add comment about 'idle_active' in tick_nohz_idle_exit() Viresh Kumar
2014-04-14 16:23 ` [PATCH 34/38] tick-sched: remove local variable 'now' from tick_setup_sched_timer() Viresh Kumar
2014-04-14 16:23 ` [PATCH 35/38] tick-broadcast: do checks before taking locks in tick_do_broadcast_on_off() Viresh Kumar
2014-04-14 16:23 ` [PATCH 36/38] tick-broadcast: get rid of extra comparison " Viresh Kumar
2014-04-14 16:23 ` [PATCH 37/38] tick-broadcast: merge tick_do_broadcast_on_off() into tick_broadcast_on_off() Viresh Kumar
2014-04-14 16:24 ` [PATCH 38/38] clockevents: set event_handler to clockevents_handle_noop() in clockevents_exchange_device() Viresh Kumar
2014-04-14 23:38 ` [PATCH 00/38] tick cleanups and bugfixes Thomas Gleixner
2014-04-15  4:28   ` Viresh Kumar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ce2b4fe3fa2e5be273017834412a197d653518e3.1397492345.git.viresh.kumar@linaro.org \
    --to=viresh.kumar@linaro.org \
    --cc=Arvind.Chauhan@arm.com \
    --cc=fweisbec@gmail.com \
    --cc=linaro-kernel@lists.linaro.org \
    --cc=linaro-networking@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®