* [PATCH] sched: fix defined-but-unused warning
@ 2008-05-11 0:25 Rabin Vincent
2008-05-13 13:21 ` Ingo Molnar
0 siblings, 1 reply; 2+ messages in thread
From: Rabin Vincent @ 2008-05-11 0:25 UTC (permalink / raw)
To: Ingo Molnar; +Cc: LKML
Fix this warning, which appears with !CONFIG_SMP:
kernel/sched.c:1216: warning: `init_hrtick' defined but not used
Signed-off-by: Rabin Vincent <rabin@rab.in>
---
kernel/sched.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/kernel/sched.c b/kernel/sched.c
index 58fb8af..5aa8c5d 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -1161,6 +1161,7 @@ static enum hrtimer_restart hrtick(struct hrtimer *timer)
return HRTIMER_NORESTART;
}
+#ifdef CONFIG_SMP
static void hotplug_hrtick_disable(int cpu)
{
struct rq *rq = cpu_rq(cpu);
@@ -1216,6 +1217,7 @@ static void init_hrtick(void)
{
hotcpu_notifier(hotplug_hrtick, 0);
}
+#endif /* CONFIG_SMP */
static void init_rq_hrtick(struct rq *rq)
{
--
1.5.5.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] sched: fix defined-but-unused warning
2008-05-11 0:25 [PATCH] sched: fix defined-but-unused warning Rabin Vincent
@ 2008-05-13 13:21 ` Ingo Molnar
0 siblings, 0 replies; 2+ messages in thread
From: Ingo Molnar @ 2008-05-13 13:21 UTC (permalink / raw)
To: Rabin Vincent; +Cc: LKML, Peter Zijlstra
* Rabin Vincent <rabin@rab.in> wrote:
> Fix this warning, which appears with !CONFIG_SMP: kernel/sched.c:1216:
> warning: `init_hrtick' defined but not used
applied, thanks Rabin.
Ingo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-05-13 13:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-11 0:25 [PATCH] sched: fix defined-but-unused warning Rabin Vincent
2008-05-13 13:21 ` Ingo Molnar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).