* [PATCH] serial: imx: Fix warning when building 'allmodconfig'
@ 2014-11-12 17:55 Fabio Estevam
0 siblings, 0 replies; only message in thread
From: Fabio Estevam @ 2014-11-12 17:55 UTC (permalink / raw)
To: gregkh; +Cc: linux-serial, Fabio Estevam
From: Fabio Estevam <fabio.estevam@freescale.com>
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'.
Reported-by: Olof's autobuilder <build@lixom.net>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
drivers/tty/serial/imx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index bdafdd9..4c5e909 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -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)
{
--
1.9.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-11-12 17:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-12 17:55 [PATCH] serial: imx: Fix warning when building 'allmodconfig' Fabio Estevam
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).