Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0cef7727c953056bb3ef9852a79d9658a1d8df4e
Commit:     0cef7727c953056bb3ef9852a79d9658a1d8df4e
Parent:     325b70c233396f0cfe15012682a5080bf8040901
Author:     Alan Stern <[EMAIL PROTECTED]>
AuthorDate: Mon Mar 19 15:33:11 2007 -0400
Committer:  Greg Kroah-Hartman <[EMAIL PROTECTED]>
CommitDate: Fri Apr 27 13:28:36 2007 -0700

    UHCI: Add some WARN_ON()s
    
    This patch (as872) adds some WARN_ON()s to various error checks which
    are never supposed to fail.  Unsettlingly, one of them has shown up in
    a user's log!  Maybe making the warning more visible and having the
    call-stack information available will help pinpoint the source of the
    problem.
    
    Signed-off-by: Alan Stern <[EMAIL PROTECTED]>
    Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 drivers/usb/host/uhci-q.c |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/drivers/usb/host/uhci-q.c b/drivers/usb/host/uhci-q.c
index 19a0cc0..4aed305 100644
--- a/drivers/usb/host/uhci-q.c
+++ b/drivers/usb/host/uhci-q.c
@@ -123,10 +123,14 @@ static struct uhci_td *uhci_alloc_td(struct uhci_hcd 
*uhci)
 
 static void uhci_free_td(struct uhci_hcd *uhci, struct uhci_td *td)
 {
-       if (!list_empty(&td->list))
+       if (!list_empty(&td->list)) {
                dev_warn(uhci_dev(uhci), "td %p still in list!\n", td);
-       if (!list_empty(&td->fl_list))
+               WARN_ON(1);
+       }
+       if (!list_empty(&td->fl_list)) {
                dev_warn(uhci_dev(uhci), "td %p still in fl_list!\n", td);
+               WARN_ON(1);
+       }
 
        dma_pool_free(uhci->td_pool, td, td->dma_handle);
 }
@@ -291,8 +295,10 @@ static struct uhci_qh *uhci_alloc_qh(struct uhci_hcd *uhci,
 static void uhci_free_qh(struct uhci_hcd *uhci, struct uhci_qh *qh)
 {
        WARN_ON(qh->state != QH_STATE_IDLE && qh->udev);
-       if (!list_empty(&qh->queue))
+       if (!list_empty(&qh->queue)) {
                dev_warn(uhci_dev(uhci), "qh %p list not empty!\n", qh);
+               WARN_ON(1);
+       }
 
        list_del(&qh->node);
        if (qh->udev) {
@@ -740,9 +746,11 @@ static void uhci_free_urb_priv(struct uhci_hcd *uhci,
 {
        struct uhci_td *td, *tmp;
 
-       if (!list_empty(&urbp->node))
+       if (!list_empty(&urbp->node)) {
                dev_warn(uhci_dev(uhci), "urb %p still on QH's list!\n",
                                urbp->urb);
+               WARN_ON(1);
+       }
 
        list_for_each_entry_safe(td, tmp, &urbp->td_list, list) {
                uhci_remove_td_from_urbp(td);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to