diff options
author | Arnd Bergmann <arnd@arndb.de> | 2016-01-25 10:41:49 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2016-01-26 10:26:06 -0500 |
commit | 7809998ab1af22602a8463845108edc49dfb9ef0 (patch) | |
tree | ec37067a880f55946043e4bed06d2d0aa0f7a738 | |
parent | e03a58c320e1103ebe97bda8ebdfcc5c9829c53f (diff) |
tick/sched: Hide unused oneshot timer code
A couple of functions in kernel/time/tick-sched.c are only
relevant for oneshot timer mode, i.e. when hires-timers or
nohz mode are enabled. If both are disabled, we get gcc warnings
about them:
kernel/time/tick-sched.c:98:16: warning: 'tick_init_jiffy_update' defined but not used [-Wunused-function]
static ktime_t tick_init_jiffy_update(void)
^
kernel/time/tick-sched.c:112:13: warning: 'tick_sched_do_timer' defined but not used [-Wunused-function]
static void tick_sched_do_timer(ktime_t now)
^
kernel/time/tick-sched.c:134:13: warning: 'tick_sched_handle' defined but not used [-Wunused-function]
static void tick_sched_handle(struct tick_sched *ts, struct pt_regs *regs)
^
This encloses the whole set of functions in an appropriate ifdef
to avoid the warning and to make it clearer when they are used.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: linux-arm-kernel@lists.infradead.org
Link: http://lkml.kernel.org/r/1453736525-1959191-1-git-send-email-arnd@arndb.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r-- | kernel/time/tick-sched.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index 7ea28ed3109d..cbe5d8dcf15a 100644 --- a/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c | |||
@@ -36,16 +36,17 @@ | |||
36 | */ | 36 | */ |
37 | static DEFINE_PER_CPU(struct tick_sched, tick_cpu_sched); | 37 | static DEFINE_PER_CPU(struct tick_sched, tick_cpu_sched); |
38 | 38 | ||
39 | /* | ||
40 | * The time, when the last jiffy update happened. Protected by jiffies_lock. | ||
41 | */ | ||
42 | static ktime_t last_jiffies_update; | ||
43 | |||
44 | struct tick_sched *tick_get_tick_sched(int cpu) | 39 | struct tick_sched *tick_get_tick_sched(int cpu) |
45 | { | 40 | { |
46 | return &per_cpu(tick_cpu_sched, cpu); | 41 | return &per_cpu(tick_cpu_sched, cpu); |
47 | } | 42 | } |
48 | 43 | ||
44 | #if defined(CONFIG_NO_HZ_COMMON) || defined(CONFIG_HIGH_RES_TIMERS) | ||
45 | /* | ||
46 | * The time, when the last jiffy update happened. Protected by jiffies_lock. | ||
47 | */ | ||
48 | static ktime_t last_jiffies_update; | ||
49 | |||
49 | /* | 50 | /* |
50 | * Must be called with interrupts disabled ! | 51 | * Must be called with interrupts disabled ! |
51 | */ | 52 | */ |
@@ -151,6 +152,7 @@ static void tick_sched_handle(struct tick_sched *ts, struct pt_regs *regs) | |||
151 | update_process_times(user_mode(regs)); | 152 | update_process_times(user_mode(regs)); |
152 | profile_tick(CPU_PROFILING); | 153 | profile_tick(CPU_PROFILING); |
153 | } | 154 | } |
155 | #endif | ||
154 | 156 | ||
155 | #ifdef CONFIG_NO_HZ_FULL | 157 | #ifdef CONFIG_NO_HZ_FULL |
156 | cpumask_var_t tick_nohz_full_mask; | 158 | cpumask_var_t tick_nohz_full_mask; |