提交 b4a512b8 编写于 作者: A Arnd Bergmann 提交者: Greg Kroah-Hartman

serial/omap: mark wait_for_xmitr as __maybe_unused

The wait_for_xmitr() function is only used if CONFIG_CONSOLE_POLL
or CONFIG_SERIAL_OMAP_CONSOLE are set, but when both are disabled,
the compiler warns about it being unused:

drivers/tty/serial/omap-serial.c:1168:13: warning: 'wait_for_xmitr' defined but not used [-Wunused-func

We could add more #ifdefs to work around it, but adding __maybe_unused
seems nicer.
Signed-off-by: NArnd Bergmann <arnd@arndb.de>
Fixes: 2172076d ("serial/omap-serial: Deinline wait_for_xmitr, save 165 bytes")
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 308bbc9a
......@@ -1165,7 +1165,7 @@ serial_omap_type(struct uart_port *port)
#define BOTH_EMPTY (UART_LSR_TEMT | UART_LSR_THRE)
static void wait_for_xmitr(struct uart_omap_port *up)
static void __maybe_unused wait_for_xmitr(struct uart_omap_port *up)
{
unsigned int status, tmout = 10000;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册