]> git.baikalelectronics.ru Git - kernel.git/commitdiff
genirq/matrix: Make - vs ?: Precedence explicit
authorKees Cook <keescook@chromium.org>
Wed, 22 Nov 2017 20:56:45 +0000 (12:56 -0800)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 23 Nov 2017 19:09:31 +0000 (20:09 +0100)
Noticed with a Clang build. This improves the readability of the ?:
expression, as it has lower precedence than the - expression. Show
explicitly that - is evaluated first.

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20171122205645.GA27125@beast
kernel/irq/matrix.c

index a3cbbc8191c52da53a1b522db248aa79528bb13f..7df2480005f863693f20d5450515d85085c225b6 100644 (file)
@@ -384,7 +384,7 @@ 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;
+       return (m->global_available - cpudown) ? cm->available : 0;
 }
 
 /**