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


Groups > linux.kernel > #1613479

[PATCH 6/9] clockevents: Make clockevents_config() static

From John Stultz <john.stultz@linaro.org>
Newsgroups linux.kernel
Subject [PATCH 6/9] clockevents: Make clockevents_config() static
Date 2017-03-30 23:10 +0200
Message-ID <tqPur-3KZ-39@gated-at.bofh.it> (permalink)
References <tqPup-3KZ-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Nicolai Stange <nicstange@gmail.com>

A clockevent device's rate should be configured before or at registration
and changed afterwards through clockevents_update_freq() only.

For the configuration at registration, we already have
clockevents_config_and_register().

Right now, there are no clockevents_config() users outside of the
clockevents core.

To mitigiate the risk of drivers errorneously reconfiguring their rates
through clockevents_config() *after* device registration, make
clockevents_config() static.

Cc: Ingo Molnar <mingo@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Richard Cochran <richardcochran@gmail.com>
Cc: Prarit Bhargava <prarit@redhat.com>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Nicolai Stange <nicstange@gmail.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
---
 include/linux/clockchips.h | 1 -
 kernel/time/clockevents.c  | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h
index 5d3053c..eef1569 100644
--- a/include/linux/clockchips.h
+++ b/include/linux/clockchips.h
@@ -182,7 +182,6 @@ extern u64 clockevent_delta2ns(unsigned long latch, struct clock_event_device *e
 extern void clockevents_register_device(struct clock_event_device *dev);
 extern int clockevents_unbind_device(struct clock_event_device *ced, int cpu);
 
-extern void clockevents_config(struct clock_event_device *dev, u32 freq);
 extern void clockevents_config_and_register(struct clock_event_device *dev,
 					    u32 freq, unsigned long min_delta,
 					    unsigned long max_delta);
diff --git a/kernel/time/clockevents.c b/kernel/time/clockevents.c
index 97ac095..4237e07 100644
--- a/kernel/time/clockevents.c
+++ b/kernel/time/clockevents.c
@@ -468,7 +468,7 @@ void clockevents_register_device(struct clock_event_device *dev)
 }
 EXPORT_SYMBOL_GPL(clockevents_register_device);
 
-void clockevents_config(struct clock_event_device *dev, u32 freq)
+static void clockevents_config(struct clock_event_device *dev, u32 freq)
 {
 	u64 sec;
 
-- 
2.7.4

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


Thread

[GIT PULL][PATCH 0/9] Timekeeping changes for 4.12 John Stultz <john.stultz@linaro.org> - 2017-03-30 23:10 +0200
  [PATCH 5/9] clocksource: h8300_timer8: Don't reset rate in ->set_state_oneshot() John Stultz <john.stultz@linaro.org> - 2017-03-30 23:10 +0200
  [PATCH 3/9] clocksource: em_sti: Split clock prepare and enable steps John Stultz <john.stultz@linaro.org> - 2017-03-30 23:10 +0200
  [PATCH 9/9] sysrq: Reset the watchdog timers while displaying high-resolution timers John Stultz <john.stultz@linaro.org> - 2017-03-30 23:10 +0200
  [PATCH 7/9] MAINTAINERS: Add Stephen Boyd as timekeeping reviewer John Stultz <john.stultz@linaro.org> - 2017-03-30 23:10 +0200
  [PATCH 8/9] timers, sched_clock: Update timeout for clock wrap John Stultz <john.stultz@linaro.org> - 2017-03-30 23:10 +0200
  [PATCH 2/9] clocksource: sh_tmu: Compute rate before registration again John Stultz <john.stultz@linaro.org> - 2017-03-30 23:10 +0200
  [PATCH 4/9] clocksource: em_sti: Compute rate before registration John Stultz <john.stultz@linaro.org> - 2017-03-30 23:10 +0200
  [PATCH 1/9] clocksource: sh_cmt: Compute rate before registration again John Stultz <john.stultz@linaro.org> - 2017-03-30 23:10 +0200
  [PATCH 6/9] clockevents: Make clockevents_config() static John Stultz <john.stultz@linaro.org> - 2017-03-30 23:10 +0200

csiph-web