From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753345AbdKWTPT (ORCPT ); Thu, 23 Nov 2017 14:15:19 -0500 Received: from terminus.zytor.com ([65.50.211.136]:37221 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753229AbdKWTPR (ORCPT ); Thu, 23 Nov 2017 14:15:17 -0500 Date: Thu, 23 Nov 2017 11:13:11 -0800 From: tip-bot for Kees Cook Message-ID: Cc: keescook@chromium.org, mingo@kernel.org, hpa@zytor.com, tglx@linutronix.de, linux-kernel@vger.kernel.org Reply-To: mingo@kernel.org, hpa@zytor.com, keescook@chromium.org, linux-kernel@vger.kernel.org, tglx@linutronix.de In-Reply-To: <20171122205645.GA27125@beast> References: <20171122205645.GA27125@beast> To: linux-tip-commits@vger.kernel.org Subject: [tip:irq/urgent] genirq/matrix: Make - vs ?: Precedence explicit Git-Commit-ID: 75f1133873d6a1276d3c19918b7c94975840f990 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 75f1133873d6a1276d3c19918b7c94975840f990 Gitweb: https://git.kernel.org/tip/75f1133873d6a1276d3c19918b7c94975840f990 Author: Kees Cook AuthorDate: Wed, 22 Nov 2017 12:56:45 -0800 Committer: Thomas Gleixner 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 Signed-off-by: Thomas Gleixner 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; } /**