serial: sunplus-uart: change sunplus_console_ports from global to static
authorTom Rix <trix@redhat.com>
Thu, 21 Apr 2022 15:25:05 +0000 (11:25 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 22 Apr 2022 14:21:33 +0000 (16:21 +0200)
Smatch reports this issue
sunplus-uart.c:501:26: warning: symbol 'sunplus_console_ports' was not declared. Should it be static?

sunplus_console_ports is only used in sunplus-uart.c so change
its storage-class specifier to static

Reviewed-by: Jiri Slaby <jirislaby@kernel.org>
Signed-off-by: Tom Rix <trix@redhat.com>
Link: https://lore.kernel.org/r/20220421152505.1531507-1-trix@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/sunplus-uart.c

index 9f15922e681bf5f5dcaa3856cff2948c85b3b803..60c73662f955c3276deb43e51ba31dcad0606567 100644 (file)
@@ -498,7 +498,7 @@ static const struct uart_ops sunplus_uart_ops = {
 };
 
 #ifdef CONFIG_SERIAL_SUNPLUS_CONSOLE
-struct sunplus_uart_port *sunplus_console_ports[SUP_UART_NR];
+static struct sunplus_uart_port *sunplus_console_ports[SUP_UART_NR];
 
 static void sunplus_uart_console_putchar(struct uart_port *port,
                                         unsigned char ch)