From: Kris Borer <kborer@gmail.com>
To: gregkh@linuxfoundation.org
Cc: stern@rowland.harvard.edu, pmladek@suse.cz,
peter.chen@freescale.com, balbi@ti.com, baolu.lu@linux.intel.com,
mjg59@coreos.com, Robert.Schlabbach@gmx.net,
chasemetzger15@gmail.com, jin.can.zhuang@intel.com,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
Kris Borer <kborer@gmail.com>
Subject: [PATCH] usb: hub: remove assignment from if condition
Date: Tue, 11 Aug 2015 11:12:45 -0400 [thread overview]
Message-ID: <1439305965-3497-1-git-send-email-kborer@gmail.com> (raw)
Fix one occurrence of the checkpatch.pl error:
ERROR: do not use assignment in if condition
The semantic patch that makes this change is:
// <smpl>
@@
identifier i;
expression E, E2, E3;
statement S1, S2;
binary operator b;
@@
+ i = E;
if (
- (i = E)
+ i
b
... && E2 && E3 ) S1 else S2
// </smpl>
Signed-off-by: Kris Borer <kborer@gmail.com>
---
drivers/usb/core/hub.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index a0b22be..78bd0d6 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -671,8 +671,8 @@ resubmit:
if (hub->quiescing)
return;
- if ((status = usb_submit_urb(hub->urb, GFP_ATOMIC)) != 0
- && status != -ENODEV && status != -EPERM)
+ status = usb_submit_urb(hub->urb, GFP_ATOMIC);
+ if (status != 0 && status != -ENODEV && status != -EPERM)
dev_err(hub->intfdev, "resubmit --> %d\n", status);
}
--
1.9.1
reply other threads:[~2015-08-11 15:13 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=1439305965-3497-1-git-send-email-kborer@gmail.com \
--to=kborer@gmail.com \
--cc=Robert.Schlabbach@gmx.net \
--cc=balbi@ti.com \
--cc=baolu.lu@linux.intel.com \
--cc=chasemetzger15@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=jin.can.zhuang@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mjg59@coreos.com \
--cc=peter.chen@freescale.com \
--cc=pmladek@suse.cz \
--cc=stern@rowland.harvard.edu \
/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®