lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <64810841-5e07-c346-01f3-dfd40a3f2df0@huawei.com>
Date:   Thu, 5 Dec 2019 20:30:25 +0800
From:   Xiongfeng Wang <wangxiongfeng2@...wei.com>
To:     Greg KH <gregkh@...uxfoundation.org>
CC:     <jslaby@...e.com>, <linux-serial@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, <huawei.libin@...wei.com>
Subject: Re: [PATCH] tty: omap-serial: remove set but unused variable



On 2019/12/5 20:13, Greg KH wrote:
> On Thu, Dec 05, 2019 at 08:04:36PM +0800, Xiongfeng Wang wrote:
>> Fix the following warning:
>> drivers/tty/serial/omap-serial.c: In function serial_omap_rlsi:
>> drivers/tty/serial/omap-serial.c:496:16: warning: variable ch set but not used [-Wunused-but-set-variable]
>>
>> Reported-by: Hulk Robot <hulkci@...wei.com>
>> Signed-off-by: Xiongfeng Wang <wangxiongfeng2@...wei.com>
>> ---
>>  drivers/tty/serial/omap-serial.c | 3 +--
>>  1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c
>> index 6420ae5..54ee3ae 100644
>> --- a/drivers/tty/serial/omap-serial.c
>> +++ b/drivers/tty/serial/omap-serial.c
>> @@ -493,10 +493,9 @@ static unsigned int check_modem_status(struct uart_omap_port *up)
>>  static void serial_omap_rlsi(struct uart_omap_port *up, unsigned int lsr)
>>  {
>>  	unsigned int flag;
>> -	unsigned char ch = 0;
>>  
>>  	if (likely(lsr & UART_LSR_DR))
>> -		ch = serial_in(up, UART_RX);
>> +		serial_in(up, UART_RX);
> 
> Shouldn't you be doing something with 'ch'?

Sorry, my original thought is trying not to modify the existing logic.
I will look into the mechanism to see if I need to check 'ch'.

Thanks,
Xiongfeng

> 
> 
> .
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ