* [PATCH] serial: 8250: omap: Move uart_write() inside PM section
@ 2023-05-15 6:57 Geert Uytterhoeven
2023-05-15 12:23 ` Tony Lindgren
0 siblings, 1 reply; 2+ messages in thread
From: Geert Uytterhoeven @ 2023-05-15 6:57 UTC (permalink / raw)
To: Greg Kroah-Hartman, Jiri Slaby, Tony Lindgren; +Cc: linux-serial, linux-kernel
If CONFIG_PM is not set (e.g. m68k/allmodconfig):
drivers/tty/serial/8250/8250_omap.c:169:13: error: ‘uart_write’ defined but not used [-Werror=unused-function]
169 | static void uart_write(struct omap8250_priv *priv, u32 reg, u32 val)
| ^~~~~~~~~~
Fix tis by moving uart_write() inside the existing section protected
by #ifdef CONFIG_PM.
Reported-by: noreply@ellerman.id.au
Link: http://kisskb.ellerman.id.au/kisskb/buildresult/14925095/
Fixes: 398cecc24846e867 ("serial: 8250: omap: Fix imprecise external abort for omap_8250_pm()")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
drivers/tty/serial/8250/8250_omap.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/tty/serial/8250/8250_omap.c b/drivers/tty/serial/8250/8250_omap.c
index 5c093dfcee1d53bb..6bd15089fa67383f 100644
--- a/drivers/tty/serial/8250/8250_omap.c
+++ b/drivers/tty/serial/8250/8250_omap.c
@@ -166,11 +166,6 @@ static u32 uart_read(struct omap8250_priv *priv, u32 reg)
return readl(priv->membase + (reg << OMAP_UART_REGSHIFT));
}
-static void uart_write(struct omap8250_priv *priv, u32 reg, u32 val)
-{
- writel(val, priv->membase + (reg << OMAP_UART_REGSHIFT));
-}
-
/*
* Called on runtime PM resume path from omap8250_restore_regs(), and
* omap8250_set_mctrl().
@@ -1637,6 +1632,11 @@ static int omap8250_lost_context(struct uart_8250_port *up)
return 0;
}
+static void uart_write(struct omap8250_priv *priv, u32 reg, u32 val)
+{
+ writel(val, priv->membase + (reg << OMAP_UART_REGSHIFT));
+}
+
/* TODO: in future, this should happen via API in drivers/reset/ */
static int omap8250_soft_reset(struct device *dev)
{
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] serial: 8250: omap: Move uart_write() inside PM section
2023-05-15 6:57 [PATCH] serial: 8250: omap: Move uart_write() inside PM section Geert Uytterhoeven
@ 2023-05-15 12:23 ` Tony Lindgren
0 siblings, 0 replies; 2+ messages in thread
From: Tony Lindgren @ 2023-05-15 12:23 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Greg Kroah-Hartman, Jiri Slaby, linux-serial, linux-kernel
* Geert Uytterhoeven <geert@linux-m68k.org> [230515 06:57]:
> If CONFIG_PM is not set (e.g. m68k/allmodconfig):
>
> drivers/tty/serial/8250/8250_omap.c:169:13: error: ‘uart_write’ defined but not used [-Werror=unused-function]
> 169 | static void uart_write(struct omap8250_priv *priv, u32 reg, u32 val)
> | ^~~~~~~~~~
>
> Fix tis by moving uart_write() inside the existing section protected
> by #ifdef CONFIG_PM.
OK thanks for fixing it:
Reviewed-by: Tony Lindgren <tony@atomide.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-05-15 12:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-15 6:57 [PATCH] serial: 8250: omap: Move uart_write() inside PM section Geert Uytterhoeven
2023-05-15 12:23 ` Tony Lindgren
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).