Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1724174

[PATCH 12/25] hrtimer: Simplify hrtimer_reprogram() call

Path csiph.com!eternal-september.org!feeder.eternal-september.org!aioe.org!bofh.it!news.nic.it!robomod
From Anna-Maria Gleixner <anna-maria@linutronix.de>
Newsgroups linux.kernel
Subject [PATCH 12/25] hrtimer: Simplify hrtimer_reprogram() call
Date Thu, 31 Aug 2017 14:30:02 +0200
Message-ID <ukwLE-5Ay-29@gated-at.bofh.it> (permalink)
References <ukwLD-5Ay-3@gated-at.bofh.it>
User-Agent quilt/0.63-1
MIME-Version 1.0
Content-Type text/plain; charset=UTF-8
Content-Disposition inline; filename=hrtimer--Simplify-hrtimer_reprogram---call.patch
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 33
Organization linux.* mail to news gateway
X-Original-Cc Peter Zijlstra <peterz@infradead.org>, Ingo Molnar <mingo@redhat.com>, Christoph Hellwig <hch@lst.org>, keescook@chromium.org, John Stultz <john.stultz@linaro.org>, Thomas Gleixner <tglx@linutronix.de>
X-Original-Date Thu, 31 Aug 2017 12:23:39 -0000
X-Original-Message-ID <20170831105826.541456583@linutronix.de>
X-Original-References <20170831105725.809317030@linutronix.de>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1724174

Show key headers only | View raw


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);

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH 12/25] hrtimer: Simplify hrtimer_reprogram() call Anna-Maria Gleixner <anna-maria@linutronix.de> - 2017-08-31 14:30 +0200

csiph-web