* [PATCH] fix compare_const_fl.cocci warnings
@ 2015-11-11 13:19 Julia Lawall
0 siblings, 0 replies; only message in thread
From: Julia Lawall @ 2015-11-11 13:19 UTC (permalink / raw)
To: Dave Penkler
Cc: gregkh, peter.chen, teuniz, linux-usb, linux-kernel, dpenkler
Move constants to the right of binary operators.
Semantic patch information:
Depends on personal taste in some cases.
Generated by: scripts/coccinelle/misc/compare_const_fl.cocci
CC: Dave Penkler <dpenkler@gmail.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
---
This is what Coccinelle generates. But it would really be more normal in
the form !(x&y).
usbtmc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/usb/class/usbtmc.c
+++ b/drivers/usb/class/usbtmc.c
@@ -494,7 +494,7 @@ static int usbtmc488_ioctl_simple(struct
dev = &data->intf->dev;
- if (0 == (data->usb488_caps & USBTMC488_CAPABILITY_SIMPLE))
+ if ((data->usb488_caps & USBTMC488_CAPABILITY_SIMPLE) == 0)
return -EINVAL;
buffer = kmalloc(8, GFP_KERNEL);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-11-11 13:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-11 13:19 [PATCH] fix compare_const_fl.cocci warnings Julia Lawall
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®