From: tip-bot for Kees Cook <tipbot@zytor.com> To: linux-tip-commits@vger.kernel.org Cc: keescook@chromium.org, mingo@kernel.org, hpa@zytor.com, tglx@linutronix.de, linux-kernel@vger.kernel.org Subject: [tip:irq/urgent] genirq/matrix: Make - vs ?: Precedence explicit Date: Thu, 23 Nov 2017 11:13:11 -0800 [thread overview] Message-ID: <tip-75f1133873d6a1276d3c19918b7c94975840f990@git.kernel.org> (raw) In-Reply-To: <20171122205645.GA27125@beast> Commit-ID: 75f1133873d6a1276d3c19918b7c94975840f990 Gitweb: https://git.kernel.org/tip/75f1133873d6a1276d3c19918b7c94975840f990 Author: Kees Cook <keescook@chromium.org> AuthorDate: Wed, 22 Nov 2017 12:56:45 -0800 Committer: Thomas Gleixner <tglx@linutronix.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@chromium.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.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; } /**
next prev parent reply other threads:[~2017-11-23 19:15 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-11-22 20:56 [PATCH] genirq: Make - vs ?: precedence explicit Kees Cook 2017-11-23 19:13 ` tip-bot for Kees Cook [this message] 2017-11-28 12:19 ` Rasmus Villemoes 2017-11-28 13:43 ` Thomas Gleixner
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=tip-75f1133873d6a1276d3c19918b7c94975840f990@git.kernel.org \ --to=tipbot@zytor.com \ --cc=hpa@zytor.com \ --cc=keescook@chromium.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-tip-commits@vger.kernel.org \ --cc=mingo@kernel.org \ --cc=tglx@linutronix.de \ --subject='Re: [tip:irq/urgent] genirq/matrix: Make - vs ?: Precedence explicit' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.