Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1282467 > unrolled thread
| Started by | "Geyslan G. Bem" <geyslan@gmail.com> |
|---|---|
| First post | 2015-12-02 23:20 +0100 |
| Last post | 2015-12-07 11:20 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] usb: use BUG_ON() instead of BUG() "Geyslan G. Bem" <geyslan@gmail.com> - 2015-12-02 23:20 +0100
Re: [PATCH] usb: use BUG_ON() instead of BUG() Peter Senna Tschudin <peter.senna@gmail.com> - 2015-12-07 11:20 +0100
| From | "Geyslan G. Bem" <geyslan@gmail.com> |
|---|---|
| Date | 2015-12-02 23:20 +0100 |
| Subject | [PATCH] usb: use BUG_ON() instead of BUG() |
| Message-ID | <qBnUK-4LF-11@gated-at.bofh.it> |
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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Peter Senna Tschudin <peter.senna@gmail.com> |
|---|---|
| Date | 2015-12-07 11:20 +0100 |
| Message-ID | <qD13H-3bd-9@gated-at.bofh.it> |
| In reply to | #1282467 |
On Wed, Dec 2, 2015 at 11:18 PM, Geyslan G. Bem <geyslan@gmail.com> wrote: > Replace BUG() with BUG_ON(). > > Caught by coccinelle. I would mention the path to the .cocci script, but other than that: Acked-by: Peter Senna Tschudin <peter.senna@gmail.com> > > 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 > -- Peter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web