Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

usb: turn dev_warn+WARN_ON combos into dev_WARN

dev_WARN is both compacter and gives better debug information
than just a WARN_ON, since people and tools will copy the device
information message together with the WARN_ON in bug reports.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by

Arjan van de Ven and committed by
Greg Kroah-Hartman
5172046d 728f0893

+8 -16
+8 -16
drivers/usb/host/uhci-q.c
··· 123 123 124 124 static void uhci_free_td(struct uhci_hcd *uhci, struct uhci_td *td) 125 125 { 126 - if (!list_empty(&td->list)) { 127 - dev_warn(uhci_dev(uhci), "td %p still in list!\n", td); 128 - WARN_ON(1); 129 - } 130 - if (!list_empty(&td->fl_list)) { 131 - dev_warn(uhci_dev(uhci), "td %p still in fl_list!\n", td); 132 - WARN_ON(1); 133 - } 126 + if (!list_empty(&td->list)) 127 + dev_WARN(uhci_dev(uhci), "td %p still in list!\n", td); 128 + if (!list_empty(&td->fl_list)) 129 + dev_WARN(uhci_dev(uhci), "td %p still in fl_list!\n", td); 134 130 135 131 dma_pool_free(uhci->td_pool, td, td->dma_handle); 136 132 } ··· 291 295 static void uhci_free_qh(struct uhci_hcd *uhci, struct uhci_qh *qh) 292 296 { 293 297 WARN_ON(qh->state != QH_STATE_IDLE && qh->udev); 294 - if (!list_empty(&qh->queue)) { 295 - dev_warn(uhci_dev(uhci), "qh %p list not empty!\n", qh); 296 - WARN_ON(1); 297 - } 298 + if (!list_empty(&qh->queue)) 299 + dev_WARN(uhci_dev(uhci), "qh %p list not empty!\n", qh); 298 300 299 301 list_del(&qh->node); 300 302 if (qh->udev) { ··· 740 746 { 741 747 struct uhci_td *td, *tmp; 742 748 743 - if (!list_empty(&urbp->node)) { 744 - dev_warn(uhci_dev(uhci), "urb %p still on QH's list!\n", 749 + if (!list_empty(&urbp->node)) 750 + dev_WARN(uhci_dev(uhci), "urb %p still on QH's list!\n", 745 751 urbp->urb); 746 - WARN_ON(1); 747 - } 748 752 749 753 list_for_each_entry_safe(td, tmp, &urbp->td_list, list) { 750 754 uhci_remove_td_from_urbp(td);