drivers/usb/ehci_debug.c: Fix unused variable warning

Clang complains about unused variables when DEBUG_CONSOLE_INIT is not
set.

Change-Id: Icf5fd69fbf54b0d40bfdb17d1396d77dcb0a6060
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61891
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
Arthur Heymans 2022-02-12 17:25:57 +01:00
parent 73a7353550
commit ca9d4feca6

View File

@ -20,16 +20,15 @@ struct ehci_debug_info {
struct dbgp_pipe ep_pipe[DBGP_MAX_ENDPOINTS];
} __packed;
#if CONFIG(DEBUG_CONSOLE_INIT)
/* When selected, you can debug the connection of usbdebug dongle.
* EHCI port register bits and USB packets are dumped on console,
* assuming some other console already works.
/* With CONFIG(DEBUG_CONSOLE_INIT), you can debug the connection of
* usbdebug dongle. EHCI port register bits and USB packets are dumped
* on console, assuming some other console already works.
*/
# define dprintk(LEVEL, args...) \
do { if (!dbgp_enabled()) printk(LEVEL, ##args); } while (0)
#else
# define dprintk(LEVEL, args...) do {} while (0)
#endif
#define dprintk(LEVEL, args...) \
do { \
if (CONFIG(DEBUG_CONSOLE_INIT) && !dbgp_enabled()) \
printk(LEVEL, ##args); \
} while (0)
#define DBGP_LEN_UPDATE(x, len) (((x) & ~0x0f) | ((len) & 0x0f))