serial: 8250: fix a sparse warning
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 serial: 8250: fix a sparse warning
drivers/tty/serial/8250/8250_core.c: In function ‘serial8250_console_write’:drivers/tty/serial/8250/8250_core.c:3244: warning: ‘flags’ may be used u unitialized in this function
--- drivers/tty/serial/8250/8250_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tty/serial/8250/8250_core.c +1 -1
@@ -3241,7 +3241,7 @@ serial8250_console_write(struct console *co, const char *s, unsigned int count) {struct uart_8250_port *up = &serial8250_ports[co->index];struct uart_port *port = &up->port; -unsigned long flags; +unsigned long flags =0 ;unsigned int ier;int locked =1 ;
Signature · 4 lines
1.8.5.5 .
Greg KH
maintainerQuoted 14 lines · Zhang Zhen
drivers/tty/serial/8250/8250_core.c: In function ‘serial8250_console_write’:drivers/tty/serial/8250/8250_core.c:3244: warning: ‘flags’ may be used u unitialized in this functionSigned-off-by Zhang Zhen <[email protected]>--- drivers/tty/serial/8250/8250_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/tty/serial/8250/8250_core.c +0
-0
drivers/tty/serial/8250/8250_core.c serial8250_console_write(struct console *co, const char *s, unsigned int count) · line 3247
Quoted 8 lines
drivers/tty/serial/8250/8250_core.c +1
-1@@ -3241,7 +3241,7 @@ serial8250_console_write(struct console *co, const char *s, unsigned int count) {struct uart_8250_port *up = &serial8250_ports[co->index];struct uart_port *port = &up->port; -unsigned long flags; +unsigned long flags =0 ;unsigned int ier;int locked =1 ;
Sparse generated this? Or did a broken / old version of gcc?
This patch fixes nothing, sorry, so I can't accept it.
greg k-h
Quoted 10 lines · Greg KH
Quoted 9 lines · Zhang Zhen
drivers/tty/serial/8250/8250_core.c: In function ‘serial8250_console_write’:drivers/tty/serial/8250/8250_core.c:3244: warning: ‘flags’ may be used u unitialized in this functionSigned-off-by Zhang Zhen <[email protected]>--- drivers/tty/serial/8250/8250_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 16 lines
drivers/tty/serial/8250/8250_core.c serial8250_console_write(struct console *co, const char *s, unsigned int count) · line 3247
Quoted 13 lines
drivers/tty/serial/8250/8250_core.c +1
-1@@ -3241,7 +3241,7 @@ serial8250_console_write(struct console *co, const char *s, unsigned int count) {struct uart_8250_port *up = &serial8250_ports[co->index];struct uart_port *port = &up->port; -unsigned long flags; +unsigned long flags =0 ;unsigned int ier;int locked =1 ;Sparse generated this? Or did a broken / old version of gcc?
Sorry, it's a gcc warning.
My gcc version is:
gcc (SUSE Linux) 4.3.4 [gcc-4_3-branch revision 152973]
Quoted 6 lines
This patch fixes nothing, sorry, so I can't accept it.
greg k-h
.
Greg KH
maintainerQuoted 27 lines · Zhang Zhen
Quoted 10 lines · Greg KH
Quoted 9 lines · Zhang Zhen
drivers/tty/serial/8250/8250_core.c: In function ‘serial8250_console_write’:drivers/tty/serial/8250/8250_core.c:3244: warning: ‘flags’ may be used u unitialized in this functionSigned-off-by Zhang Zhen <[email protected]>--- drivers/tty/serial/8250/8250_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Quoted 16 lines
drivers/tty/serial/8250/8250_core.c serial8250_console_write(struct console *co, const char *s, unsigned int count) · line 3247
Quoted 13 lines
drivers/tty/serial/8250/8250_core.c +1
-1@@ -3241,7 +3241,7 @@ serial8250_console_write(struct console *co, const char *s, unsigned int count) {struct uart_8250_port *up = &serial8250_ports[co->index];struct uart_port *port = &up->port; -unsigned long flags; +unsigned long flags =0 ;unsigned int ier;int locked =1 ;Sparse generated this? Or did a broken / old version of gcc?
Quoted 4 lines
Sorry, it's a gcc warning.
My gcc version is:
gcc (SUSE Linux) 4.3.4 [gcc-4_3-branch revision 152973]
That's really old and obsolete, please use a modern version of gcc, especially when sending in patches for compiler warnings.
greg k-h
Quoted 28 lines · Greg KH
Quoted 27 lines · Zhang Zhen
Quoted 26 lines · Greg KH
Quoted 14 lines · Zhang Zhen
drivers/tty/serial/8250/8250_core.c: In function ‘serial8250_console_write’:drivers/tty/serial/8250/8250_core.c:3244: warning: ‘flags’ may be used u unitialized in this functionSigned-off-by Zhang Zhen <[email protected]>--- drivers/tty/serial/8250/8250_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/tty/serial/8250/8250_core.c +0
-0drivers/tty/serial/8250/8250_core.c serial8250_console_write(struct console *co, const char *s, unsigned int count) · line 3247
Quoted 8 lines
drivers/tty/serial/8250/8250_core.c +1
-1@@ -3241,7 +3241,7 @@ serial8250_console_write(struct console *co, const char *s, unsigned int count) {struct uart_8250_port *up = &serial8250_ports[co->index];struct uart_port *port = &up->port; -unsigned long flags; +unsigned long flags =0 ;unsigned int ier;int locked =1 ;Sparse generated this? Or did a broken / old version of gcc?
Quoted 8 lines
Quoted 4 lines
Sorry, it's a gcc warning.
My gcc version is:
gcc (SUSE Linux) 4.3.4 [gcc-4_3-branch revision 152973]That's really old and obsolete, please use a modern version of gcc, especially when sending in patches for compiler warnings.
Ok, thanks!
Quoted 4 lines
greg k-h
.