提交 bb5c4342 编写于 作者: T Thomas Gleixner

genirq/matrix: Fix the precedence fix for real

The previous commit which made the operator precedence in
irq_matrix_available() explicit made the implicit brokenness explicitely
wrong. It was wrong in the original commit already. The overworked
maintainer did not notice it either when merging the patch.

Replace the confusing '?' construct by a simple and obvious if ().

Fixes: 75f11338 ("genirq/matrix: Make - vs ?: Precedence explicit")
Reported-by: NRasmus Villemoes <rasmus.villemoes@prevas.dk>
Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
Cc: Kees Cook <keescook@chromium.org>
上级 ae64f9bd
......@@ -384,7 +384,9 @@ unsigned int irq_matrix_available(struct irq_matrix *m, bool cpudown)
{
struct cpumap *cm = this_cpu_ptr(m->maps);
return (m->global_available - cpudown) ? cm->available : 0;
if (!cpudown)
return m->global_available;
return m->global_available - cm->available;
}
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册