From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756635AbbCGCxs (ORCPT ); Fri, 6 Mar 2015 21:53:48 -0500 Received: from mail-pa0-f42.google.com ([209.85.220.42]:36639 "EHLO mail-pa0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754727AbbCGCuU (ORCPT ); Fri, 6 Mar 2015 21:50:20 -0500 From: John Stultz To: lkml Cc: John Stultz , Dave Jones , Linus Torvalds , Thomas Gleixner , Richard Cochran , Prarit Bhargava , Stephen Boyd , Ingo Molnar , Peter Zijlstra Subject: [PATCH 03/12] clocksource: Remove clocksource_max_deferment() Date: Fri, 6 Mar 2015 18:49:54 -0800 Message-Id: <1425696603-16878-4-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1425696603-16878-1-git-send-email-john.stultz@linaro.org> References: <1425696603-16878-1-git-send-email-john.stultz@linaro.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org clocksource_max_deferment() doesn't do anything useful anymore, so zap it. Cc: Dave Jones Cc: Linus Torvalds Cc: Thomas Gleixner Cc: Richard Cochran Cc: Prarit Bhargava Cc: Stephen Boyd Cc: Ingo Molnar Cc: Peter Zijlstra Signed-off-by: John Stultz --- kernel/time/clocksource.c | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c index e5d00e6..4988411 100644 --- a/kernel/time/clocksource.c +++ b/kernel/time/clocksource.c @@ -499,20 +499,6 @@ u64 clocks_calc_max_nsecs(u32 mult, u32 shift, u32 maxadj, u64 mask) return max_nsecs; } -/** - * clocksource_max_deferment - Returns max time the clocksource should be deferred - * @cs: Pointer to clocksource - * - */ -static u64 clocksource_max_deferment(struct clocksource *cs) -{ - u64 max_nsecs; - - max_nsecs = clocks_calc_max_nsecs(cs->mult, cs->shift, cs->maxadj, - cs->mask); - return max_nsecs; -} - #ifndef CONFIG_ARCH_USES_GETTIMEOFFSET static struct clocksource *clocksource_find_best(bool oneshot, bool skipcur) @@ -684,7 +670,8 @@ void __clocksource_updatefreq_scale(struct clocksource *cs, u32 scale, u32 freq) cs->maxadj = clocksource_max_adjustment(cs); } - cs->max_idle_ns = clocksource_max_deferment(cs); + cs->max_idle_ns = clocks_calc_max_nsecs(cs->mult, cs->shift, + cs->maxadj, cs->mask); } EXPORT_SYMBOL_GPL(__clocksource_updatefreq_scale); @@ -731,7 +718,8 @@ int clocksource_register(struct clocksource *cs) cs->name); /* calculate max idle time permitted for this clocksource */ - cs->max_idle_ns = clocksource_max_deferment(cs); + cs->max_idle_ns = clocks_calc_max_nsecs(cs->mult, cs->shift, + cs->maxadj, cs->mask); mutex_lock(&clocksource_mutex); clocksource_enqueue(cs); -- 1.9.1