Re: [PATCH 5/5] serial: jsm: Use B0 instead of 0

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

 



On Wed, May 11, 2022 at 01:11:39PM +0300, Ilpo Järvinen wrote:
> Use B0 to check zero baudrate rather than literal 0.
> 
> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@xxxxxxxxxxxxxxx>
> ---
>  drivers/tty/serial/jsm/jsm_cls.c | 2 +-
>  drivers/tty/serial/jsm/jsm_neo.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/tty/serial/jsm/jsm_cls.c b/drivers/tty/serial/jsm/jsm_cls.c
> index 046b624e5f71..ca05e84a7c90 100644
> --- a/drivers/tty/serial/jsm/jsm_cls.c
> +++ b/drivers/tty/serial/jsm/jsm_cls.c
> @@ -689,7 +689,7 @@ static void cls_param(struct jsm_channel *ch)
>  	/*
>  	 * If baud rate is zero, flush queues, and set mval to drop DTR.
>  	 */
> -	if ((ch->ch_c_cflag & (CBAUD)) == 0) {
> +	if ((ch->ch_c_cflag & (CBAUD)) == B0) {

Sure, why not. How about dropping the unnecessary parenthesis around
CBAUD while at it?

Johan



[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