All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: linux-serial@vger.kernel.org,
	Greg KH <gregkh@linuxfoundation.org>,
	Jiri Slaby <jirislaby@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 5/5] serial: jsm: Use B0 instead of 0
Date: Fri, 13 May 2022 09:14:02 +0200	[thread overview]
Message-ID: <Yn4FOofAvoqdaY9D@hovoldconsulting.com> (raw)
In-Reply-To: <20220511101139.5306-6-ilpo.jarvinen@linux.intel.com>

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@linux.intel.com>
> ---
>  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

      reply	other threads:[~2022-05-13  7:14 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-11 10:11 [PATCH 0/5] tty/serial termbits cleanups Ilpo Järvinen
2022-05-11 10:11 ` [PATCH 1/5] tty/termbits: remove #ifdef CMSPAR that is always defined Ilpo Järvinen
2022-05-13  7:01   ` Johan Hovold
2022-05-11 10:11 ` [PATCH 2/5] tty/termbits: remove #ifdef BOTHER " Ilpo Järvinen
2022-05-11 10:11   ` Ilpo Järvinen
2022-05-13  7:07   ` Johan Hovold
2022-05-13  7:07     ` Johan Hovold
2022-05-11 10:11 ` [PATCH 3/5] tty/termbits: remove #ifdef IBSHIFT " Ilpo Järvinen
2022-05-13  7:10   ` Johan Hovold
2022-05-11 10:11 ` [PATCH 4/5] serial: fsl_lpuart: Remove unnecessary clearing for CRTSCTS Ilpo Järvinen
2022-05-13  7:11   ` Johan Hovold
2022-05-11 10:11 ` [PATCH 5/5] serial: jsm: Use B0 instead of 0 Ilpo Järvinen
2022-05-13  7:14   ` Johan Hovold [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Yn4FOofAvoqdaY9D@hovoldconsulting.com \
    --to=johan@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=jirislaby@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.