[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-75f1133873d6a1276d3c19918b7c94975840f990@git.kernel.org>
Date: Thu, 23 Nov 2017 11:13:11 -0800
From: tip-bot for Kees Cook <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: keescook@...omium.org, mingo@...nel.org, hpa@...or.com,
tglx@...utronix.de, linux-kernel@...r.kernel.org
Subject: [tip:irq/urgent] genirq/matrix: Make - vs ?: Precedence explicit
Commit-ID: 75f1133873d6a1276d3c19918b7c94975840f990
Gitweb: https://git.kernel.org/tip/75f1133873d6a1276d3c19918b7c94975840f990
Author: Kees Cook <keescook@...omium.org>
AuthorDate: Wed, 22 Nov 2017 12:56:45 -0800
Committer: Thomas Gleixner <tglx@...utronix.de>
CommitDate: Thu, 23 Nov 2017 20:09:31 +0100
genirq/matrix: Make - vs ?: Precedence explicit
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@...omium.org>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Link: https://lkml.kernel.org/r/20171122205645.GA27125@beast
---
kernel/irq/matrix.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/irq/matrix.c b/kernel/irq/matrix.c
index a3cbbc8..7df2480 100644
--- a/kernel/irq/matrix.c
+++ b/kernel/irq/matrix.c
@@ -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;
}
/**
Powered by blists - more mailing lists