lkml.org 
[lkml]   [2017]   [Aug]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 12/25] hrtimer: Simplify hrtimer_reprogram() call
The hrtimer_reprogramm() call can be simplified by dereferencing the
hrtimer clock base inside the function. It is a preparatory change for
softirq based hrtimers.

Signed-off-by: Anna-Maria Gleixner <anna-maria@linutronix.de>
---
kernel/time/hrtimer.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

--- a/kernel/time/hrtimer.c
+++ b/kernel/time/hrtimer.c
@@ -650,10 +650,10 @@ static inline void retrigger_next_event(
*
* Called with interrupts disabled and base->cpu_base.lock held
*/
-static void hrtimer_reprogram(struct hrtimer *timer,
- struct hrtimer_clock_base *base)
+static void hrtimer_reprogram(struct hrtimer *timer)
{
struct hrtimer_cpu_base *cpu_base = this_cpu_ptr(&hrtimer_bases);
+ struct hrtimer_clock_base *base = timer->base;
ktime_t expires = ktime_sub(hrtimer_get_expires(timer), base->offset);

WARN_ON_ONCE(hrtimer_get_expires_tv64(timer) < 0);
@@ -944,7 +944,7 @@ void hrtimer_start_range_ns(struct hrtim
if (!leftmost)
goto unlock;

- hrtimer_reprogram(timer, new_base);
+ hrtimer_reprogram(timer);

unlock:
unlock_hrtimer_base(timer, &flags);

\
 
 \ /
  Last update: 2017-08-31 14:29    [W:0.704 / U:0.280 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site