From: "Geyslan G. Bem" <geyslan@gmail.com>
To: peter.senna@gmail.com
Cc: "Geyslan G. Bem" <geyslan@gmail.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>,
Julia Lawall <Julia.Lawall@lip6.fr>,
Saurabh Karajgaonkar <skarajga@visteon.com>,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
Felipe Balbi <balbi@ti.com>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] usb: use BUG_ON() instead of BUG()
Date: Wed, 2 Dec 2015 19:18:19 -0300 [thread overview]
Message-ID: <1449094703-31159-1-git-send-email-geyslan@gmail.com> (raw)
Replace BUG() with BUG_ON().
Caught by coccinelle.
Signed-off-by: Geyslan G. Bem <geyslan@gmail.com>
---
drivers/usb/host/oxu210hp-hcd.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/usb/host/oxu210hp-hcd.c b/drivers/usb/host/oxu210hp-hcd.c
index 1f139d8..bc74aca 100644
--- a/drivers/usb/host/oxu210hp-hcd.c
+++ b/drivers/usb/host/oxu210hp-hcd.c
@@ -394,8 +394,7 @@ static void ehci_quiesce(struct oxu_hcd *oxu)
u32 temp;
#ifdef DEBUG
- if (!HC_IS_RUNNING(oxu_to_hcd(oxu)->state))
- BUG();
+ BUG_ON(!HC_IS_RUNNING(oxu_to_hcd(oxu)->state));
#endif
/* wait for any schedule enables/disables to take effect */
@@ -1709,9 +1708,8 @@ static void start_unlink_async(struct oxu_hcd *oxu, struct ehci_qh *qh)
#ifdef DEBUG
assert_spin_locked(&oxu->lock);
- if (oxu->reclaim || (qh->qh_state != QH_STATE_LINKED
- && qh->qh_state != QH_STATE_UNLINK_WAIT))
- BUG();
+ BUG_ON(oxu->reclaim || (qh->qh_state != QH_STATE_LINKED
+ && qh->qh_state != QH_STATE_UNLINK_WAIT));
#endif
/* stop async schedule right now? */
--
2.6.3
next reply other threads:[~2015-12-02 22:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-02 22:18 Geyslan G. Bem [this message]
2015-12-07 10:10 ` [PATCH] usb: use BUG_ON() instead of BUG() Peter Senna Tschudin
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=1449094703-31159-1-git-send-email-geyslan@gmail.com \
--to=geyslan@gmail.com \
--cc=Julia.Lawall@lip6.fr \
--cc=balbi@ti.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=peter.senna@gmail.com \
--cc=rafael.j.wysocki@intel.com \
--cc=sergei.shtylyov@cogentembedded.com \
--cc=skarajga@visteon.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;
as well as URLs for NNTP newsgroup(s).