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

usb: kill DEBUG compile option

In the drivers that no longer need it, it is removed.
It is removed from the Makefile. Drivers not fully converted
to dynamic debug have it shifted down into the individual
drivers.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Oliver Neukum and committed by
Greg Kroah-Hartman
1c20163d 0b5fa3b2

+35 -21
-2
drivers/usb/host/Makefile
··· 2 2 # Makefile for USB Host Controller Drivers 3 3 # 4 4 5 - ccflags-$(CONFIG_USB_DEBUG) := -DDEBUG 6 - 7 5 # tell define_trace.h where to find the xhci trace header 8 6 CFLAGS_xhci-trace.o := -I$(src) 9 7
+4 -4
drivers/usb/host/ehci-dbg.c
··· 18 18 19 19 /* this file is part of ehci-hcd.c */ 20 20 21 - #if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG) 21 + #ifdef CONFIG_DYNAMIC_DEBUG 22 22 23 23 /* check the values in the HCSPARAMS register 24 24 * (host controller _Structural_ parameters) ··· 62 62 63 63 #endif 64 64 65 - #if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG) 65 + #ifdef CONFIG_DYNAMIC_DEBUG 66 66 67 67 /* check the values in the HCCPARAMS register 68 68 * (host controller _Capability_ parameters) ··· 101 101 102 102 #endif 103 103 104 - #if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG) 104 + #ifdef CONFIG_DYNAMIC_DEBUG 105 105 106 106 static void __maybe_unused 107 107 dbg_qtd (const char *label, struct ehci_hcd *ehci, struct ehci_qtd *qtd) ··· 301 301 dbg_port_buf (char *buf, unsigned len, const char *label, int port, u32 status) 302 302 { return 0; } 303 303 304 - #endif /* DEBUG || CONFIG_DYNAMIC_DEBUG */ 304 + #endif /* CONFIG_DYNAMIC_DEBUG */ 305 305 306 306 /* functions have the "wrong" filename when they're output... */ 307 307 #define dbg_status(ehci, label, status) { \
+1 -1
drivers/usb/host/ehci-fsl.c
··· 413 413 struct fsl_usb2_platform_data *pdata = dev_get_platdata(dev); 414 414 u32 tmp; 415 415 416 - #if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG) 416 + #ifdef CONFIG_DYNAMIC_DEBUG 417 417 u32 mode = ehci_readl(ehci, hcd->regs + FSL_SOC_USB_USBMODE); 418 418 mode &= USBMODE_CM_MASK; 419 419 tmp = ehci_readl(ehci, hcd->regs + 0x140); /* usbcmd */
+3 -3
drivers/usb/host/ehci-hcd.c
··· 1313 1313 sizeof(struct ehci_qh), sizeof(struct ehci_qtd), 1314 1314 sizeof(struct ehci_itd), sizeof(struct ehci_sitd)); 1315 1315 1316 - #if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG) 1316 + #ifdef CONFIG_DYNAMIC_DEBUG 1317 1317 ehci_debug_root = debugfs_create_dir("ehci", usb_debug_root); 1318 1318 if (!ehci_debug_root) { 1319 1319 retval = -ENOENT; ··· 1362 1362 platform_driver_unregister(&PLATFORM_DRIVER); 1363 1363 clean0: 1364 1364 #endif 1365 - #if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG) 1365 + #ifdef CONFIG_DYNAMIC_DEBUG 1366 1366 debugfs_remove(ehci_debug_root); 1367 1367 ehci_debug_root = NULL; 1368 1368 err_debug: ··· 1386 1386 #ifdef PS3_SYSTEM_BUS_DRIVER 1387 1387 ps3_ehci_driver_unregister(&PS3_SYSTEM_BUS_DRIVER); 1388 1388 #endif 1389 - #if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG) 1389 + #ifdef CONFIG_DYNAMIC_DEBUG 1390 1390 debugfs_remove(ehci_debug_root); 1391 1391 #endif 1392 1392 clear_bit(USB_EHCI_LOADED, &usb_hcds_loaded);
+2 -2
drivers/usb/host/ehci-q.c
··· 168 168 * Note: this routine is never called for Isochronous transfers. 169 169 */ 170 170 if (urb->dev->tt && !usb_pipeint(urb->pipe) && !qh->clearing_tt) { 171 - #if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG) 171 + #ifdef CONFIG_DYNAMIC_DEBUG 172 172 struct usb_device *tt = urb->dev->tt->hub; 173 173 dev_dbg(&tt->dev, 174 174 "clear tt buffer port %d, a%d ep%d t%08x\n", 175 175 urb->dev->ttport, urb->dev->devnum, 176 176 usb_pipeendpoint(urb->pipe), token); 177 - #endif /* DEBUG || CONFIG_DYNAMIC_DEBUG */ 177 + #endif /* CONFIG_DYNAMIC_DEBUG */ 178 178 if (!ehci_is_TDI(ehci) 179 179 || urb->dev->tt->hub != 180 180 ehci_to_hcd(ehci)->self.root_hub) {
+4 -4
drivers/usb/host/ehci.h
··· 38 38 #endif 39 39 40 40 /* statistics can be kept for tuning/monitoring */ 41 - #if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG) 41 + #ifdef CONFIG_DYNAMIC_DEBUG 42 42 #define EHCI_STATS 43 43 #endif 44 44 ··· 248 248 #endif 249 249 250 250 /* debug files */ 251 - #if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG) 251 + #ifdef CONFIG_DYNAMIC_DEBUG 252 252 struct dentry *debug_dir; 253 253 #endif 254 254 ··· 832 832 dev_warn(ehci_to_hcd(ehci)->self.controller , fmt , ## args) 833 833 834 834 835 - #if !defined(DEBUG) && !defined(CONFIG_DYNAMIC_DEBUG) 835 + #ifndef CONFIG_DYNAMIC_DEBUG 836 836 #define STUB_DEBUG_FILES 837 - #endif /* !DEBUG && !CONFIG_DYNAMIC_DEBUG */ 837 + #endif 838 838 839 839 /*-------------------------------------------------------------------------*/ 840 840
+4
drivers/usb/host/imx21-dbg.c
··· 18 18 19 19 /* this file is part of imx21-hcd.c */ 20 20 21 + #ifdef CONFIG_DYNAMIC_DEBUG 22 + #define DEBUG 23 + #endif 24 + 21 25 #ifndef DEBUG 22 26 23 27 static inline void create_debug_files(struct imx21 *imx21) { }
+4
drivers/usb/host/imx21-hcd.c
··· 62 62 63 63 #include "imx21-hcd.h" 64 64 65 + #ifdef CONFIG_DYNAMIC_DEBUG 66 + #define DEBUG 67 + #endif 68 + 65 69 #ifdef DEBUG 66 70 #define DEBUG_LOG_FRAME(imx21, etd, event) \ 67 71 (etd)->event##_frame = readl((imx21)->regs + USBH_FRMNUB)
+4
drivers/usb/host/imx21-hcd.h
··· 24 24 #ifndef __LINUX_IMX21_HCD_H__ 25 25 #define __LINUX_IMX21_HCD_H__ 26 26 27 + #ifdef CONFIG_DYNAMIC_DEBUG 28 + #define DEBUG 29 + #endif 30 + 27 31 #include <linux/platform_data/usb-mx2.h> 28 32 29 33 #define NUM_ISO_ETDS 2
+4
drivers/usb/host/oxu210hp-hcd.c
··· 60 60 #define oxu_info(oxu, fmt, args...) \ 61 61 dev_info(oxu_to_hcd(oxu)->self.controller , fmt , ## args) 62 62 63 + #ifdef CONFIG_DYNAMIC_DEBUG 64 + #define DEBUG 65 + #endif 66 + 63 67 static inline struct usb_hcd *oxu_to_hcd(struct oxu_hcd *oxu) 64 68 { 65 69 return container_of((void *) oxu, struct usb_hcd, hcd_priv);
+2 -2
drivers/usb/host/uhci-debug.c
··· 20 20 21 21 static struct dentry *uhci_debugfs_root; 22 22 23 - #if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG) 23 + #ifdef CONFIG_DYNAMIC_DEBUG 24 24 25 25 /* Handle REALLY large printks so we don't overflow buffers */ 26 26 static void lprintk(char *buf) ··· 635 635 636 636 #endif /* CONFIG_DEBUG_FS */ 637 637 638 - #else /* DEBUG || CONFIG_DYNAMIC_DEBUG*/ 638 + #else /* CONFIG_DYNAMIC_DEBUG*/ 639 639 640 640 static inline void lprintk(char *buf) 641 641 {}
+3 -3
drivers/usb/host/uhci-hcd.c
··· 69 69 * show all queues in /sys/kernel/debug/uhci/[pci_addr] 70 70 * debug = 3, show all TDs in URBs when dumping 71 71 */ 72 - #if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG) 72 + #ifdef CONFIG_DYNAMIC_DEBUG 73 73 74 74 static int debug = 1; 75 75 module_param(debug, int, S_IRUGO | S_IWUSR); ··· 870 870 ignore_oc ? ", overcurrent ignored" : ""); 871 871 set_bit(USB_UHCI_LOADED, &usb_hcds_loaded); 872 872 873 - #if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG) 873 + #ifdef CONFIG_DYNAMIC_DEBUG 874 874 errbuf = kmalloc(ERRBUF_LEN, GFP_KERNEL); 875 875 if (!errbuf) 876 876 goto errbuf_failed; ··· 931 931 #endif 932 932 kmem_cache_destroy(uhci_up_cachep); 933 933 debugfs_remove(uhci_debugfs_root); 934 - #if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG) 934 + #ifdef CONFIG_DYNAMIC_DEBUG 935 935 kfree(errbuf); 936 936 #endif 937 937 clear_bit(USB_UHCI_LOADED, &usb_hcds_loaded);