[PATCH] serial: 8250: omap: mark uart_write() as maybe unused

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



uart_write() was introduced as a helper function that is for now only
used in omap8250_soft_reset(). The latter function is only defined if
CONFIG_PM is enabled. So add __maybe_unused to the defintion of the
former function to fix

	drivers/tty/serial/8250/8250_omap.c:169:13: error: ‘uart_write’ defined but not used [-Werror=unused-function]

for CONFIG_PM=n builds.

Fixes: 398cecc24846 ("serial: 8250: omap: Fix imprecise external abort for omap_8250_pm()")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>
---
Hello,

the offending commit is in tty-next.

Best regards
Uwe

 drivers/tty/serial/8250/8250_omap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/8250/8250_omap.c b/drivers/tty/serial/8250/8250_omap.c
index 57981f48ae69..43a62e7d7387 100644
--- a/drivers/tty/serial/8250/8250_omap.c
+++ b/drivers/tty/serial/8250/8250_omap.c
@@ -166,7 +166,7 @@ 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)
+static void __maybe_unused uart_write(struct omap8250_priv *priv, u32 reg, u32 val)
 {
 	writel(val, priv->membase + (reg << OMAP_UART_REGSHIFT));
 }
-- 
2.39.2




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux