public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@lip6.fr>
To: Jon Hunter <jonathanh@nvidia.com>,
	Jiang Liu <jiang.liu@linux.intel.com>,
	Marc Zyngier <marc.zyngier@arm.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	linux-kernel@vger.kernel.org, kbuild-all@01.org
Subject: [PATCH] irqdomain: fix compare_const_fl.cocci warnings
Date: Wed, 20 Apr 2016 18:49:42 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.10.1604201848270.3089@hadrien> (raw)

 Move constants to the right of binary operators.

Generated by: scripts/coccinelle/misc/compare_const_fl.cocci

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
---

Not a big deal, but the transformed code looks better to me.

 irqdomain.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/kernel/irq/irqdomain.c
+++ b/kernel/irq/irqdomain.c
@@ -618,7 +618,7 @@ unsigned int irq_create_fwspec_mapping(s
 		 * If the trigger type has not been set yet, then set
 		 * it now and return the interrupt number.
 		 */
-		if (IRQ_TYPE_NONE == irq_get_trigger_type(virq)) {
+		if (irq_get_trigger_type(virq) == IRQ_TYPE_NONE) {
 			irq_set_irq_type(virq, type);
 			return virq;
 		}

             reply	other threads:[~2016-04-20 16:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-20 16:49 Julia Lawall [this message]
2016-04-20 17:19 ` [PATCH] irqdomain: fix compare_const_fl.cocci warnings Marc Zyngier
2016-04-22 17:42 ` Thomas Gleixner
2016-04-22 18:59   ` Julia Lawall
2016-04-22 18:21 ` Jon Hunter
2016-04-22 19:00   ` Julia Lawall
2016-04-22 19:10     ` Jon Hunter

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=alpine.DEB.2.10.1604201848270.3089@hadrien \
    --to=julia.lawall@lip6.fr \
    --cc=jiang.liu@linux.intel.com \
    --cc=jonathanh@nvidia.com \
    --cc=kbuild-all@01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marc.zyngier@arm.com \
    --cc=tglx@linutronix.de \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox