Skip to content

Commit

Permalink
genirq/matrix: Make - vs ?: Precedence explicit
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Kees Cook authored and Thomas Gleixner committed Nov 23, 2017
1 parent 328bf1b commit 75f1133
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/irq/matrix.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand Down

0 comments on commit 75f1133

Please sign in to comment.