All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] serial: 8250: fix a sparse warning
       [not found] <1425886615-78601-1-git-send-email-zhenzhang.zhang@huawei.com>
@ 2015-03-09  7:42   ` Zhang Zhen
  0 siblings, 0 replies; 8+ messages in thread
From: Zhang Zhen @ 2015-03-09  7:42 UTC (permalink / raw)
  To: linux-serial, linux-kernel; +Cc: tim.kryger, gregkh, jamie, alan, arnd

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

Signed-off-by: Zhang Zhen <zhenzhang.zhang@huawei.com>
---
 drivers/tty/serial/8250/8250_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c
index deae122..50702e2 100644
--- a/drivers/tty/serial/8250/8250_core.c
+++ b/drivers/tty/serial/8250/8250_core.c
@@ -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;

-- 
1.8.5.5


.





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

* [PATCH] serial: 8250: fix a sparse warning
@ 2015-03-09  7:42   ` Zhang Zhen
  0 siblings, 0 replies; 8+ messages in thread
From: Zhang Zhen @ 2015-03-09  7:42 UTC (permalink / raw)
  To: linux-serial, linux-kernel; +Cc: tim.kryger, gregkh, jamie, alan, arnd

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

Signed-off-by: Zhang Zhen <zhenzhang.zhang@huawei.com>
---
 drivers/tty/serial/8250/8250_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c
index deae122..50702e2 100644
--- a/drivers/tty/serial/8250/8250_core.c
+++ b/drivers/tty/serial/8250/8250_core.c
@@ -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;

-- 
1.8.5.5


.

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

* Re: [PATCH] serial: 8250: fix a sparse warning
  2015-03-09  7:42   ` Zhang Zhen
  (?)
@ 2015-03-09  8:22   ` Greg KH
  2015-03-09  8:41       ` Zhang Zhen
  -1 siblings, 1 reply; 8+ messages in thread
From: Greg KH @ 2015-03-09  8:22 UTC (permalink / raw)
  To: Zhang Zhen; +Cc: linux-serial, linux-kernel, tim.kryger, jamie, alan, arnd

On Mon, Mar 09, 2015 at 03:42:30PM +0800, Zhang Zhen wrote:
> 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
> 
> Signed-off-by: Zhang Zhen <zhenzhang.zhang@huawei.com>
> ---
>  drivers/tty/serial/8250/8250_core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c
> index deae122..50702e2 100644
> --- a/drivers/tty/serial/8250/8250_core.c
> +++ b/drivers/tty/serial/8250/8250_core.c
> @@ -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

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

* Re: [PATCH] serial: 8250: fix a sparse warning
  2015-03-09  8:22   ` Greg KH
@ 2015-03-09  8:41       ` Zhang Zhen
  0 siblings, 0 replies; 8+ messages in thread
From: Zhang Zhen @ 2015-03-09  8:41 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-serial, linux-kernel, tim.kryger, jamie, alan, arnd

On 2015/3/9 16:22, Greg KH wrote:
> On Mon, Mar 09, 2015 at 03:42:30PM +0800, Zhang Zhen wrote:
>> 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
>>
>> Signed-off-by: Zhang Zhen <zhenzhang.zhang@huawei.com>
>> ---
>>  drivers/tty/serial/8250/8250_core.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c
>> index deae122..50702e2 100644
>> --- a/drivers/tty/serial/8250/8250_core.c
>> +++ b/drivers/tty/serial/8250/8250_core.c
>> @@ -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]

> This patch fixes nothing, sorry, so I can't accept it.
> 
> greg k-h
> 
> .
> 



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

* Re: [PATCH] serial: 8250: fix a sparse warning
@ 2015-03-09  8:41       ` Zhang Zhen
  0 siblings, 0 replies; 8+ messages in thread
From: Zhang Zhen @ 2015-03-09  8:41 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-serial, linux-kernel, tim.kryger, jamie, alan, arnd

On 2015/3/9 16:22, Greg KH wrote:
> On Mon, Mar 09, 2015 at 03:42:30PM +0800, Zhang Zhen wrote:
>> 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
>>
>> Signed-off-by: Zhang Zhen <zhenzhang.zhang@huawei.com>
>> ---
>>  drivers/tty/serial/8250/8250_core.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c
>> index deae122..50702e2 100644
>> --- a/drivers/tty/serial/8250/8250_core.c
>> +++ b/drivers/tty/serial/8250/8250_core.c
>> @@ -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]

> This patch fixes nothing, sorry, so I can't accept it.
> 
> greg k-h
> 
> .
> 

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

* Re: [PATCH] serial: 8250: fix a sparse warning
  2015-03-09  8:41       ` Zhang Zhen
  (?)
@ 2015-03-09  8:53       ` Greg KH
  2015-03-09  9:02           ` Zhang Zhen
  -1 siblings, 1 reply; 8+ messages in thread
From: Greg KH @ 2015-03-09  8:53 UTC (permalink / raw)
  To: Zhang Zhen; +Cc: linux-serial, linux-kernel, tim.kryger, jamie, alan, arnd

On Mon, Mar 09, 2015 at 04:41:00PM +0800, Zhang Zhen wrote:
> On 2015/3/9 16:22, Greg KH wrote:
> > On Mon, Mar 09, 2015 at 03:42:30PM +0800, Zhang Zhen wrote:
> >> 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
> >>
> >> Signed-off-by: Zhang Zhen <zhenzhang.zhang@huawei.com>
> >> ---
> >>  drivers/tty/serial/8250/8250_core.c | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c
> >> index deae122..50702e2 100644
> >> --- a/drivers/tty/serial/8250/8250_core.c
> >> +++ b/drivers/tty/serial/8250/8250_core.c
> >> @@ -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]

That's really old and obsolete, please use a modern version of gcc,
especially when sending in patches for compiler warnings.

greg k-h

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

* Re: [PATCH] serial: 8250: fix a sparse warning
  2015-03-09  8:53       ` Greg KH
@ 2015-03-09  9:02           ` Zhang Zhen
  0 siblings, 0 replies; 8+ messages in thread
From: Zhang Zhen @ 2015-03-09  9:02 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-serial, linux-kernel, tim.kryger, jamie, alan, arnd

On 2015/3/9 16:53, Greg KH wrote:
> On Mon, Mar 09, 2015 at 04:41:00PM +0800, Zhang Zhen wrote:
>> On 2015/3/9 16:22, Greg KH wrote:
>>> On Mon, Mar 09, 2015 at 03:42:30PM +0800, Zhang Zhen wrote:
>>>> 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
>>>>
>>>> Signed-off-by: Zhang Zhen <zhenzhang.zhang@huawei.com>
>>>> ---
>>>>  drivers/tty/serial/8250/8250_core.c | 2 +-
>>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c
>>>> index deae122..50702e2 100644
>>>> --- a/drivers/tty/serial/8250/8250_core.c
>>>> +++ b/drivers/tty/serial/8250/8250_core.c
>>>> @@ -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]
> 
> That's really old and obsolete, please use a modern version of gcc,
> especially when sending in patches for compiler warnings.
> 
Ok, thanks!

> greg k-h
> 
> .
> 



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

* Re: [PATCH] serial: 8250: fix a sparse warning
@ 2015-03-09  9:02           ` Zhang Zhen
  0 siblings, 0 replies; 8+ messages in thread
From: Zhang Zhen @ 2015-03-09  9:02 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-serial, linux-kernel, tim.kryger, jamie, alan, arnd

On 2015/3/9 16:53, Greg KH wrote:
> On Mon, Mar 09, 2015 at 04:41:00PM +0800, Zhang Zhen wrote:
>> On 2015/3/9 16:22, Greg KH wrote:
>>> On Mon, Mar 09, 2015 at 03:42:30PM +0800, Zhang Zhen wrote:
>>>> 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
>>>>
>>>> Signed-off-by: Zhang Zhen <zhenzhang.zhang@huawei.com>
>>>> ---
>>>>  drivers/tty/serial/8250/8250_core.c | 2 +-
>>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c
>>>> index deae122..50702e2 100644
>>>> --- a/drivers/tty/serial/8250/8250_core.c
>>>> +++ b/drivers/tty/serial/8250/8250_core.c
>>>> @@ -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]
> 
> That's really old and obsolete, please use a modern version of gcc,
> especially when sending in patches for compiler warnings.
> 
Ok, thanks!

> greg k-h
> 
> .
> 

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

end of thread, other threads:[~2015-03-09  9:06 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1425886615-78601-1-git-send-email-zhenzhang.zhang@huawei.com>
2015-03-09  7:42 ` [PATCH] serial: 8250: fix a sparse warning Zhang Zhen
2015-03-09  7:42   ` Zhang Zhen
2015-03-09  8:22   ` Greg KH
2015-03-09  8:41     ` Zhang Zhen
2015-03-09  8:41       ` Zhang Zhen
2015-03-09  8:53       ` Greg KH
2015-03-09  9:02         ` Zhang Zhen
2015-03-09  9:02           ` Zhang Zhen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.