mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@lip6.fr>
To: Dave Penkler <dpenkler@gmail.com>
Cc: gregkh@linuxfoundation.org, peter.chen@freescale.com,
	teuniz@gmail.com, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org, dpenkler@gmail.com
Subject: [PATCH] fix compare_const_fl.cocci warnings
Date: Wed, 11 Nov 2015 13:19:23 +0000 (GMT)	[thread overview]
Message-ID: <alpine.DEB.2.10.1511111317520.3193@hadrien> (raw)

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

                 reply	other threads:[~2015-11-11 13:19 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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.1511111317520.3193@hadrien \
    --to=julia.lawall@lip6.fr \
    --cc=dpenkler@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=peter.chen@freescale.com \
    --cc=teuniz@gmail.com \
    /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

all inboxes | Powered by JetHome®