2008-03-12 10:03:17

by Dave Young

[permalink] [raw]
Subject: [PATCH -mm] x86 halt warning fix

While halting kernel report warning at arch/x86/kernel/reboot.c : 424
fix the WARN_ON_ONCE param to ret

Signed-off-by: Dave Young <[email protected]>

---
arch/x86/kernel/reboot.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff -upr linux/arch/x86/kernel/reboot.c linux.new/arch/x86/kernel/reboot.c
--- linux/arch/x86/kernel/reboot.c 2008-03-12 17:56:48.000000000 +0800
+++ linux.new/arch/x86/kernel/reboot.c 2008-03-12 17:58:43.000000000 +0800
@@ -421,7 +421,7 @@ static void native_machine_shutdown(void

schedparm.sched_priority = 99;
ret = sched_setscheduler(current, SCHED_RR, &schedparm);
- WARN_ON_ONCE(1);
+ WARN_ON_ONCE(ret);

set_cpus_allowed(current, cpumask_of_cpu(reboot_cpu_id));
}


2008-03-12 10:45:24

by Ingo Molnar

[permalink] [raw]
Subject: Re: [PATCH -mm] x86 halt warning fix


* Dave Young <[email protected]> wrote:

> While halting kernel report warning at arch/x86/kernel/reboot.c : 424
> fix the WARN_ON_ONCE param to ret

thanks, applied.

Ingo