[PATCH] sched: Fix unused variable warning on UP
From: Geert Uytterhoeven
Date: Sun Feb 07 2010 - 14:47:30 EST
Fix warning
| kernel/sched.c:2650: warning: unused variable 'cpu'
if CONFIG_SMP is not set.
Signed-off-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
---
kernel/sched.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/kernel/sched.c b/kernel/sched.c
index 3a8fb30..c47561e 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -2647,9 +2647,10 @@ void wake_up_new_task(struct task_struct *p,
unsigned long clone_flags)
{
unsigned long flags;
struct rq *rq;
- int cpu = get_cpu();
#ifdef CONFIG_SMP
+ int cpu = get_cpu();
+
/*
* Fork balancing, do it here and not earlier because:
* - cpus_allowed can change in the fork path
--
1.6.0.4
--
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/