Re: [PATCH V2 01/19] tick: trivial cleanups

2014-04-22 Thread Viresh Kumar
On 23 April 2014 02:53, Frederic Weisbecker  wrote:
> On Mon, Apr 21, 2014 at 03:24:57PM +0530, Viresh Kumar wrote:
>> diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
>> index 6558b7a..9e9ddba 100644
>> --- a/kernel/time/tick-sched.c
>> +++ b/kernel/time/tick-sched.c
>> @@ -108,7 +108,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();
>> @@ -248,8 +247,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);
>
> Breaking < 80 char lines is arguable although I'm not sure it still matters 
> in 2014.

I agree. In case we don't care anymore, checkpatch.pl must be fixed..

> But I don't see much the point of the above change. I usually prefer when 
> line contents
> are a bit balanced. It may be a matter of taste I guess.

When I tried doing it, I though it might come in a single line, but
then it didn't.
The way I wrap things normally is I let 'vim' do it after 80 columns. And it
tries to fit max in a single line.. So this happened.

I can drop it if you want.. :)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH V2 01/19] tick: trivial cleanups

2014-04-22 Thread Frederic Weisbecker
On Mon, Apr 21, 2014 at 03:24:57PM +0530, Viresh Kumar wrote:
> diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
> index 6558b7a..9e9ddba 100644
> --- a/kernel/time/tick-sched.c
> +++ b/kernel/time/tick-sched.c
> @@ -108,7 +108,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();
> @@ -248,8 +247,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);

Breaking < 80 char lines is arguable although I'm not sure it still matters in 
2014.

But I don't see much the point of the above change. I usually prefer when line 
contents
are a bit balanced. It may be a matter of taste I guess.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH V2 01/19] tick: trivial cleanups

2014-04-21 Thread Viresh Kumar
This does some trivial fixups:
- break lines longer than 80 columns
- merge few lines together
- don't break print messages even if they cross 80 columns
- remove extra whitespaces and blank lines
- replace printk() with pr_*()

Signed-off-by: Viresh Kumar 
---
 include/linux/tick.h |  3 ++-
 kernel/time/clockevents.c|  4 ++--
 kernel/time/clocksource.c| 14 +-
 kernel/time/tick-broadcast.c | 16 ++--
 kernel/time/tick-internal.h  |  5 -
 kernel/time/tick-oneshot.c   |  3 +--
 kernel/time/tick-sched.c | 29 -
 kernel/time/timekeeping.c| 10 --
 8 files changed, 40 insertions(+), 44 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/clockevents.c b/kernel/time/clockevents.c
index ad362c2..2ba812bc 100644
--- a/kernel/time/clockevents.c
+++ b/kernel/time/clockevents.c
@@ -146,7 +146,7 @@ static int clockevents_increase_min_delta(struct 
clock_event_device *dev)
 {
/* Nothing to do if we already reached the limit */
if (dev->min_delta_ns >= MIN_DELTA_LIMIT) {
-   printk(KERN_WARNING "CE: Reprogramming failure. Giving up\n");
+   pr_warn("CE: Reprogramming failure. Giving up\n");
dev->next_event.tv64 = KTIME_MAX;
return -ETIME;
}
@@ -159,7 +159,7 @@ static int clockevents_increase_min_delta(struct 
clock_event_device *dev)
if (dev->min_delta_ns > MIN_DELTA_LIMIT)
dev->min_delta_ns = MIN_DELTA_LIMIT;
 
-   printk(KERN_WARNING "CE: %s increased min_delta_ns to %llu nsec\n",
+   pr_warn("CE: %s increased min_delta_ns to %llu nsec\n",
   dev->name ? dev->name : "?",
   (unsigned long long) dev->min_delta_ns);
return 0;
diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c
index ba3e502..6ef39af 100644
--- a/kernel/time/clocksource.c
+++ b/kernel/time/clocksource.c
@@ -219,8 +219,7 @@ static void __clocksource_unstable(struct clocksource *cs)
 
 static void clocksource_unstable(struct clocksource *cs, int64_t delta)
 {
-   printk(KERN_WARNING "Clocksource %s unstable (delta = %Ld ns)\n",
-  cs->name, delta);
+   pr_warn("Clocksource %s unstable (delta = %Ld ns)\n", cs->name, delta);
__clocksource_unstable(cs);
 }
 
@@ -643,9 +642,8 @@ static void __clocksource_select(bool skipcur)
 */
if (!(cs->flags & CLOCK_SOURCE_VALID_FOR_HRES) && oneshot) {
/* Override clocksource cannot be used. */
-   printk(KERN_WARNING "Override clocksource %s is not "
-  "HRT compatible. Cannot switch while in "
-  "HRT/NOHZ mode\n", cs->name);
+   pr_warn("Override clocksource %s is not HRT compatible. 
Cannot switch while in HRT/NOHZ mode\n",
+   cs->name);
override_name[0] = 0;
} else
/* Override clocksource can be used. */
@@ -1095,12 +1093,10 @@ __setup("clocksource=", boot_override_clocksource);
 static int __init boot_override_clock(char* str)
 {
if (!strcmp(str, "pmtmr")) {
-   printk("Warning: clock=pmtmr is deprecated. "
-   "Use clocksource=acpi_pm.\n");
+   printk("Warning: clock=pmtmr is deprecated. Use 
clocksource=acpi_pm.\n");
return boot_override_clocksource("acpi_pm");
}
-   printk("Warning! clock= boot option is deprecated. "
-   "Use clocksource=xyz\n");
+   printk("Warning! clock= boot option is deprecated. Use 
clocksource=xyz\n");
return boot_override_clocksource(str);
 }
 
diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c
index 64c5990..b1c7b21 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)
ca