lkml.org 
[lkml]   [2014]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 34/38] tick-sched: remove local variable 'now' from tick_setup_sched_timer()
Date
Local variable 'now' is used at only one place and so can be easily replaced by
ktime_get() instead.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
kernel/time/tick-sched.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
index a0a6705..78751b3 100644
--- a/kernel/time/tick-sched.c
+++ b/kernel/time/tick-sched.c
@@ -1116,7 +1116,6 @@ early_param("skew_tick", skew_tick);
void tick_setup_sched_timer(void)
{
struct tick_sched *ts = &__get_cpu_var(tick_cpu_sched);
- ktime_t now = ktime_get();

/*
* Emulate tick processing via per-CPU hrtimers:
@@ -1136,13 +1135,12 @@ void tick_setup_sched_timer(void)
}

for (;;) {
- hrtimer_forward(&ts->sched_timer, now, tick_period);
+ hrtimer_forward(&ts->sched_timer, ktime_get(), tick_period);
hrtimer_start_expires(&ts->sched_timer,
HRTIMER_MODE_ABS_PINNED);
/* Check, if the timer was already in the past */
if (hrtimer_active(&ts->sched_timer))
break;
- now = ktime_get();
}

#ifdef CONFIG_NO_HZ_COMMON
--
1.7.12.rc2.18.g61b472e


\
 
 \ /
  Last update: 2014-04-18 08:01    [W:0.259 / U:0.924 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site