[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <54FD6196.60200@huawei.com>
Date: Mon, 9 Mar 2015 17:02:14 +0800
From: Zhang Zhen <zhenzhang.zhang@...wei.com>
To: Greg KH <gregkh@...uxfoundation.org>
CC: <linux-serial@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<tim.kryger@...aro.org>, <jamie@...ieiles.com>,
<alan@...ux.intel.com>, <arnd@...db.de>
Subject: Re: [PATCH] serial: 8250: fix a sparse warning
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@...wei.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
>
> .
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists