Re: [PATCH] serial: fsl_lpuart: Remove unused 'bd' variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Greg,

On Sun, Sep 17, 2017 at 1:44 PM, Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
> On Sat, Sep 16, 2017 at 09:54:46PM -0300, Fabio Estevam wrote:
>> From: Fabio Estevam <fabio.estevam@xxxxxxx>
>>
>> The 'bd' variable is never used inside lpuart32_set_termios(),
>> so just remove it.
>>
>> This fixes the following build warning when W=1 is used:
>>
>> drivers/tty/serial/fsl_lpuart.c: In function 'lpuart32_set_termios':
>> drivers/tty/serial/fsl_lpuart.c:1652:32: warning: variable 'bd' set but not used [-Wunused-but-set-variable]
>>
>> Signed-off-by: Fabio Estevam <fabio.estevam@xxxxxxx>
>> ---
>>  drivers/tty/serial/fsl_lpuart.c | 3 +--
>>  1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c
>> index 849c1f9..63f99a0 100644
>> --- a/drivers/tty/serial/fsl_lpuart.c
>> +++ b/drivers/tty/serial/fsl_lpuart.c
>> @@ -1649,12 +1649,11 @@ lpuart32_set_termios(struct uart_port *port, struct ktermios *termios,
>>  {
>>       struct lpuart_port *sport = container_of(port, struct lpuart_port, port);
>>       unsigned long flags;
>> -     unsigned long ctrl, old_ctrl, bd, modem;
>> +     unsigned long ctrl, old_ctrl, modem;
>>       unsigned int  baud;
>>       unsigned int old_csize = old ? old->c_cflag & CSIZE : CS8;
>>
>>       ctrl = old_ctrl = lpuart32_read(&sport->port, UARTCTRL);
>> -     bd = lpuart32_read(&sport->port, UARTBAUD);
>
> Are you positive this still works if you do this?  Sometimes you have to
> read ports for stuff like this.  Have you tested this?

Yes, it works on imx7ulp-evk. Since commit , the UARTBAUD register is
configured inside lpuart32_serial_setbrg() function.

I will update the commit log to make this clear.

Thanks
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux