linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] serial: sunplus-uart: change sunplus_console_ports from global to static
@ 2022-04-21 15:25 Tom Rix
  2022-04-22  5:18 ` Jiri Slaby
  0 siblings, 1 reply; 2+ messages in thread
From: Tom Rix @ 2022-04-21 15:25 UTC (permalink / raw)
  To: hammerh0314, gregkh, jirislaby; +Cc: linux-serial, linux-kernel, Tom Rix

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

Signed-off-by: Tom Rix <trix@redhat.com>
---
 drivers/tty/serial/sunplus-uart.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/sunplus-uart.c b/drivers/tty/serial/sunplus-uart.c
index 9f15922e681b..60c73662f955 100644
--- a/drivers/tty/serial/sunplus-uart.c
+++ b/drivers/tty/serial/sunplus-uart.c
@@ -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)
-- 
2.27.0


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

* Re: [PATCH] serial: sunplus-uart: change sunplus_console_ports from global to static
  2022-04-21 15:25 [PATCH] serial: sunplus-uart: change sunplus_console_ports from global to static Tom Rix
@ 2022-04-22  5:18 ` Jiri Slaby
  0 siblings, 0 replies; 2+ messages in thread
From: Jiri Slaby @ 2022-04-22  5:18 UTC (permalink / raw)
  To: Tom Rix, hammerh0314, gregkh; +Cc: linux-serial, linux-kernel

On 21. 04. 22, 17:25, Tom Rix wrote:
> 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

Heh, coincidentally, I've sent the same fix yesterday too:
https://lore.kernel.org/all/20220421101708.5640-2-jslaby@suse.cz/

Greg, whichever you take:
Reviewed-by: Jiri Slaby <jirislaby@kernel.org>

> Signed-off-by: Tom Rix <trix@redhat.com>
> ---
>   drivers/tty/serial/sunplus-uart.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/tty/serial/sunplus-uart.c b/drivers/tty/serial/sunplus-uart.c
> index 9f15922e681b..60c73662f955 100644
> --- a/drivers/tty/serial/sunplus-uart.c
> +++ b/drivers/tty/serial/sunplus-uart.c
> @@ -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)


-- 
js
suse labs

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

end of thread, other threads:[~2022-04-22  5:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-21 15:25 [PATCH] serial: sunplus-uart: change sunplus_console_ports from global to static Tom Rix
2022-04-22  5:18 ` Jiri Slaby

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