[PATCH] kernel: smp: correct warning in on_each_cpu_cond

From: Sasha Levin
Date: Mon Aug 04 2014 - 17:02:41 EST


smp_call_function_single() returns 0 on success, not the other
way around. Fix the warning to trigger on failure rather than
success.

Signed-off-by: Sasha Levin <sasha.levin@xxxxxxxxxx>
---
kernel/smp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/smp.c b/kernel/smp.c
index 487653b..aff8aa1 100644
--- a/kernel/smp.c
+++ b/kernel/smp.c
@@ -670,7 +670,7 @@ void on_each_cpu_cond(bool (*cond_func)(int cpu, void *info),
if (cond_func(cpu, info)) {
ret = smp_call_function_single(cpu, func,
info, wait);
- WARN_ON_ONCE(!ret);
+ WARN_ON_ONCE(ret);
}
preempt_enable();
}
--
1.7.10.4

--
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/