diff options
author | Felipe Balbi <felipe.balbi@linux.intel.com> | 2016-09-30 14:12:34 +0300 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2016-11-03 11:38:29 +0300 |
commit | 57b14da56227217424493c9e0632877b740d2a09 (patch) | |
tree | 1e7ac89d3fd3297008726cadee74a22b338b209e /drivers/usb/dwc3/debug.h | |
parent | a97ea994605e805efeb1dc07a6d10ec5dd8e16d4 (diff) | |
download | linux-57b14da56227217424493c9e0632877b740d2a09.tar.xz |
usb: dwc3: don't compile dwc3_trace() unless CONFIG_FTRACE=y
We don't need dwc3_trace() unless we're building a
kernel with CONFIG_FTRACE. This patch reduces
dwc3.ko text size a bit while also removing overhead
of dwc3_trace() calls.
text data bss dec hex filename
50796 581 0 51377 c8b1 drivers/usb/dwc3/dwc3.o
43961 581 0 44542 adfe drivers/usb/dwc3/dwc3.o.patched
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/dwc3/debug.h')
-rw-r--r-- | drivers/usb/dwc3/debug.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/usb/dwc3/debug.h b/drivers/usb/dwc3/debug.h index b287fc6ab29e..d93780e84f07 100644 --- a/drivers/usb/dwc3/debug.h +++ b/drivers/usb/dwc3/debug.h @@ -344,7 +344,13 @@ static inline const char *dwc3_gadget_generic_cmd_status_string(int status) } } + +#if IS_ENABLED(CONFIG_FTRACE) void dwc3_trace(void (*trace)(struct va_format *), const char *fmt, ...); +#else +static inline void dwc3_trace(void (*trace)(struct va_format *), const char *fmt, ...) +{ } +#endif #ifdef CONFIG_DEBUG_FS extern void dwc3_debugfs_init(struct dwc3 *); |