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: 75f1133873 ("genirq/matrix: Make - vs ?: Precedence explicit")
Reported-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Kees Cook <keescook@chromium.org>
This commit is contained in:
Thomas Gleixner 2017-11-28 15:40:33 +01:00
parent ae64f9bd1d
commit bb5c434282

View File

@ -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;
}
/**