diff options
author | Peter Hurley <peter@hurleysoftware.com> | 2015-04-11 18:02:36 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-05-06 23:27:00 +0300 |
commit | 6b3cddccf4eec0883feb065aea28dd9770bb17d0 (patch) | |
tree | 20a4634760f8f402b0950af8e5fa8a9e614568c2 /include/linux/serial_core.h | |
parent | bbdfe620b97443e1a127570ca856b000904d42f3 (diff) | |
download | linux-6b3cddccf4eec0883feb065aea28dd9770bb17d0.tar.xz |
serial: core: Fix unused variable warnings from uart_console()
If CONFIG_SERIAL_CORE_CONSOLE=n, build warnings are generated by
uart_console() macro expansion:
drivers/tty/serial/of_serial.c: In function ‘of_serial_suspend_8250’:
drivers/tty/serial/of_serial.c:262:20: warning: unused variable ‘port’ [-Wunused-variable]
struct uart_port *port = &port8250->port;
^
drivers/tty/serial/of_serial.c: In function ‘of_serial_resume_8250’:
drivers/tty/serial/of_serial.c:272:20: warning: unused variable ‘port’ [-Wunused-variable]
struct uart_port *port = &port8250->port;
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/serial_core.h')
-rw-r--r-- | include/linux/serial_core.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index 025dad9dcde4..297d4fa1cfe5 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h @@ -35,7 +35,7 @@ #define uart_console(port) \ ((port)->cons && (port)->cons->index == (port)->line) #else -#define uart_console(port) (0) +#define uart_console(port) ({ (void)port; 0; }) #endif struct uart_port; |