mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] surface pro 4: fix compare_const_fl.cocci warnings
@ 2015-12-27 21:10 Julia Lawall
  2016-01-14 23:15 ` Darren Hart
  0 siblings, 1 reply; 2+ messages in thread
From: Julia Lawall @ 2015-12-27 21:10 UTC (permalink / raw)
  To: Weng Xuetian
  Cc: Chen Yu, Darren Hart, linux-kernel, platform-driver-x86,
	Weng Xuetian, kbuild-all

Move constants to the right of binary operators.

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

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

It's not a big deal, but the constant on the right looks nicer to me.  
key_code seems like the more important information, so it is nice to see 
it first.

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

--- a/drivers/platform/x86/surfacepro_button.c
+++ b/drivers/platform/x86/surfacepro_button.c
@@ -111,7 +111,7 @@ static void surface_button_notify(struct
 		break;
 	}
 	input = button->input;
-	if (KEY_RESERVED == key_code)
+	if (key_code == KEY_RESERVED)
 		return;
 	if (pressed)
 		pm_wakeup_event(&device->dev, 0);

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

* Re: [PATCH] surface pro 4: fix compare_const_fl.cocci warnings
  2015-12-27 21:10 [PATCH] surface pro 4: fix compare_const_fl.cocci warnings Julia Lawall
@ 2016-01-14 23:15 ` Darren Hart
  0 siblings, 0 replies; 2+ messages in thread
From: Darren Hart @ 2016-01-14 23:15 UTC (permalink / raw)
  To: Julia Lawall
  Cc: Weng Xuetian, Chen Yu, linux-kernel, platform-driver-x86, kbuild-all

On Sun, Dec 27, 2015 at 10:10:58PM +0100, Julia Lawall wrote:
> Move constants to the right of binary operators.
> 
> Generated by: scripts/coccinelle/misc/compare_const_fl.cocci
> 
> CC: Weng Xuetian <wengxt@gmail.com>
> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
> Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>

Queued, thank you.

-- 
Darren Hart
Intel Open Source Technology Center

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

end of thread, other threads:[~2016-01-14 23:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-27 21:10 [PATCH] surface pro 4: fix compare_const_fl.cocci warnings Julia Lawall
2016-01-14 23:15 ` Darren Hart

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

Powered by JetHome