public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] irqdomain: fix compare_const_fl.cocci warnings
@ 2016-04-20 16:49 Julia Lawall
  2016-04-20 17:19 ` Marc Zyngier
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Julia Lawall @ 2016-04-20 16:49 UTC (permalink / raw)
  To: Jon Hunter, Jiang Liu, Marc Zyngier, Thomas Gleixner,
	linux-kernel, kbuild-all

 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;
 		}

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-04-22 19:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-20 16:49 [PATCH] irqdomain: fix compare_const_fl.cocci warnings Julia Lawall
2016-04-20 17:19 ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox