Skip to contentSkip to conversation

serial: imx: Fix warning when building 'allmodconfig'

PATCH New Fabio Estevam 1 participant 1 message Nov 12, 2014

Subsystems (2)
lore
Share & tools
lore

Fabio Estevam

author reviewer
#0 lore raw

PATCH 1/1 serial: imx: Fix warning when building 'allmodconfig'

From: Fabio Estevam <[email protected]>

When CONFIG_SERIAL_IMX_CONSOLE=n and CONFIG_CONSOLE_POLL=y we get the following build warning:

drivers/tty/serial/imx.c:306:13: warning: 'imx_port_ucrs_save' defined but not used [-Wunused-function] drivers/tty/serial/imx.c:315:13: warning: 'imx_port_ucrs_restore' defined but not used [-Wunused-function]

imx_port_ucrs_save/restore are only used under CONFIG_SERIAL_IMX_CONSOLE, so their definitions should be also be protected only by CONFIG_SERIAL_IMX_CONSOLE.

This was detected when building 'allmodconfig'.

---
 drivers/tty/serial/imx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tty/serial/imx.c +1 -1
index bdafdd9..4c5e909 100644
@@ -302,7 +302,7 @@ static inline int is_imx6q_uart(struct imx_port *sport)
 /*
  * Save and restore functions for UCR1, UCR2 and UCR3 registers
  */
-#if defined(CONFIG_CONSOLE_POLL) || defined(CONFIG_SERIAL_IMX_CONSOLE)
+#if defined(CONFIG_SERIAL_IMX_CONSOLE)
 static void imx_port_ucrs_save(struct uart_port *port,
 			       struct imx_port_ucrs *ucr)
 {
Signature · 1 line
1.9.1