linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] serial: sunzilog: Mark sunzilog_putchar() __maybe_unused
@ 2021-10-26  8:04 Geert Uytterhoeven
  2021-10-26  8:14 ` Arnd Bergmann
  2021-10-26 12:32 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2021-10-26  8:04 UTC (permalink / raw)
  To: David S . Miller, Greg Kroah-Hartman, Jiri Slaby
  Cc: Arnd Bergmann, sparclinux, linux-serial, linux-kernel,
	Geert Uytterhoeven

If CONSOLE_POLL=n, CONFIG_SERIAL_SUNZILOG_CONSOLE=n, and CONFIG_SERIO=m:

    drivers/tty/serial/sunzilog.c:1128:13: error: ‘sunzilog_putchar’ defined but not used [-Werror=unused-function]
     1128 | static void sunzilog_putchar(struct uart_port *port, int ch)
	  |             ^~~~~~~~~~~~~~~~

Fix this by marking sunzilog_putchar() __maybe_unused.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
One more casualty of CONFIG_WERROR=y.
---
 drivers/tty/serial/sunzilog.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/sunzilog.c b/drivers/tty/serial/sunzilog.c
index 1a54e3e52ed630b6..b714b00d2dadd44f 100644
--- a/drivers/tty/serial/sunzilog.c
+++ b/drivers/tty/serial/sunzilog.c
@@ -1125,7 +1125,7 @@ static void sunzilog_free_tables(void)
 
 #define ZS_PUT_CHAR_MAX_DELAY	2000	/* 10 ms */
 
-static void sunzilog_putchar(struct uart_port *port, int ch)
+static void __maybe_unused sunzilog_putchar(struct uart_port *port, int ch)
 {
 	struct zilog_channel __iomem *channel = ZILOG_CHANNEL_FROM_PORT(port);
 	int loops = ZS_PUT_CHAR_MAX_DELAY;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] serial: sunzilog: Mark sunzilog_putchar() __maybe_unused
  2021-10-26  8:04 [PATCH] serial: sunzilog: Mark sunzilog_putchar() __maybe_unused Geert Uytterhoeven
@ 2021-10-26  8:14 ` Arnd Bergmann
  2021-10-26 12:32 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Arnd Bergmann @ 2021-10-26  8:14 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: David S . Miller, Greg Kroah-Hartman, Jiri Slaby, Arnd Bergmann,
	sparclinux, open list:SERIAL DRIVERS, Linux Kernel Mailing List

On Tue, Oct 26, 2021 at 10:04 AM Geert Uytterhoeven
<geert@linux-m68k.org> wrote:
>
> If CONSOLE_POLL=n, CONFIG_SERIAL_SUNZILOG_CONSOLE=n, and CONFIG_SERIO=m:
>
>     drivers/tty/serial/sunzilog.c:1128:13: error: ‘sunzilog_putchar’ defined but not used [-Werror=unused-function]
>      1128 | static void sunzilog_putchar(struct uart_port *port, int ch)
>           |             ^~~~~~~~~~~~~~~~
>
> Fix this by marking sunzilog_putchar() __maybe_unused.
>
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>

Looks good to me

Acked-by: Arnd Bergmann <arnd@arndb.de>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] serial: sunzilog: Mark sunzilog_putchar() __maybe_unused
  2021-10-26  8:04 [PATCH] serial: sunzilog: Mark sunzilog_putchar() __maybe_unused Geert Uytterhoeven
  2021-10-26  8:14 ` Arnd Bergmann
@ 2021-10-26 12:32 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2021-10-26 12:32 UTC (permalink / raw)
  To: geert; +Cc: gregkh, jirislaby, arnd, sparclinux, linux-serial, linux-kernel

From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: Tue, 26 Oct 2021 10:04:26 +0200

> If CONSOLE_POLL=n, CONFIG_SERIAL_SUNZILOG_CONSOLE=n, and CONFIG_SERIO=m:
> 
>     drivers/tty/serial/sunzilog.c:1128:13: error: ‘sunzilog_putchar’ defined but not used [-Werror=unused-function]
>      1128 | static void sunzilog_putchar(struct uart_port *port, int ch)
> 	  |             ^~~~~~~~~~~~~~~~
> 
> Fix this by marking sunzilog_putchar() __maybe_unused.
> 
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>

Acked-by: David S. Miller <davem@davemloft.net>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-10-26 12:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-26  8:04 [PATCH] serial: sunzilog: Mark sunzilog_putchar() __maybe_unused Geert Uytterhoeven
2021-10-26  8:14 ` Arnd Bergmann
2021-10-26 12:32 ` David Miller

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).