提交 6b3cddcc 编写于 作者: P Peter Hurley 提交者: Greg Kroah-Hartman

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: NPeter Hurley <peter@hurleysoftware.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 bbdfe620
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册