Skip to content

Commit

Permalink
serial/omap: mark wait_for_xmitr as __maybe_unused
Browse files Browse the repository at this point in the history
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: Arnd Bergmann <arnd@arndb.de>
Fixes: 2172076 ("serial/omap-serial: Deinline wait_for_xmitr, save 165 bytes")
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Arnd Bergmann authored and Greg Kroah-Hartman committed Feb 7, 2016
1 parent 308bbc9 commit b4a512b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/tty/serial/omap-serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit b4a512b

Please sign in to comment.