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


Groups > linux.kernel > #1209280

[PATCH 1/2] hrtimer: Simplify get_target_base() returning current base

Path csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!bofh.it!news.nic.it!robomod
From Frederic Weisbecker <fweisbec@gmail.com>
Newsgroups linux.kernel
Subject [PATCH 1/2] hrtimer: Simplify get_target_base() returning current base
Date Tue, 18 Aug 2015 16:20:01 +0200
Message-ID <pYPU5-fd-17@gated-at.bofh.it> (permalink)
References <pYPU5-fd-15@gated-at.bofh.it>
X-Original-To Thomas Gleixner <tglx@linutronix.de>
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Yh8ZS2Mq9yAX/gfQ6TimRCmqfqwHgiIBsLuUs14+jAA=; b=duq9vE18nibz3BOqkEuTozt7EP0x/HcnTW6a//1c/10EIp7vktQCXeV1/Z4vB5uXu3 02ZCO3CqiBvaL22J0Ttd/EoNsC5XXWDIcJdeoz5GvEYRbyl1eF1XNjszmmydpQYrkQ8Z eDsCUbYlmxHSq/fegxcBsxvimRgj2rfNSV2BPwA7fmu9ZSXT7Oqx4FT19bKeDxVMO9cq hBMm5OAWK7GFpVFJPceLQwYqPeNMnyEWwOOs1nTV8QVWNQdENnBosJu5kOh6m6wM46jp srsPnx8luFL/vwJcxJPxm9es2kBSnButd6EPwMO1F1hEB8suqyvezEWkl8IeMf+ZTQkZ lagw==
X-Received by 10.180.8.234 with SMTP id u10mr43806901wia.4.1439907531970; Tue, 18 Aug 2015 07:18:51 -0700 (PDT)
X-Mailer git-send-email 2.1.4
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 38
Organization linux.* mail to news gateway
X-Original-Cc LKML <linux-kernel@vger.kernel.org>, Frederic Weisbecker <fweisbec@gmail.com>
X-Original-Date Tue, 18 Aug 2015 16:18:28 +0200
X-Original-Message-ID <1439907509-9553-2-git-send-email-fweisbec@gmail.com>
X-Original-References <1439907509-9553-1-git-send-email-fweisbec@gmail.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1209280

Show key headers only | View raw


Instead of fetching again the current cpu base, just take it from the
parameter.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
---
 kernel/time/hrtimer.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
index 55575d4..f9eb21b 100644
--- a/kernel/time/hrtimer.c
+++ b/kernel/time/hrtimer.c
@@ -183,7 +183,7 @@ struct hrtimer_cpu_base *get_target_base(struct hrtimer_cpu_base *base,
 					 int pinned)
 {
 	if (pinned || !base->migration_enabled)
-		return this_cpu_ptr(&hrtimer_bases);
+		return base;
 	return &per_cpu(hrtimer_bases, get_nohz_timer_target());
 }
 #else
@@ -191,7 +191,7 @@ static inline
 struct hrtimer_cpu_base *get_target_base(struct hrtimer_cpu_base *base,
 					 int pinned)
 {
-	return this_cpu_ptr(&hrtimer_bases);
+	return base;
 }
 #endif
 
-- 
2.1.4

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

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


Thread

[PATCH 1/2] hrtimer: Simplify get_target_base() returning current base Frederic Weisbecker <fweisbec@gmail.com> - 2015-08-18 16:20 +0200
  [tip:timers/core] hrtimer: Simplify get_target_base()   by returning current base tip-bot for Frederic Weisbecker <tipbot@zytor.com> - 2015-08-18 18:40 +0200

csiph-web