linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: linux-serial@vger.kernel.org,
	Greg KH <gregkh@linuxfoundation.org>,
	Jiri Slaby <jirislaby@kernel.org>,
	linux-kernel@vger.kernel.org
Cc: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Subject: [PATCH 5/5] serial: jsm: Use B0 instead of 0
Date: Wed, 11 May 2022 13:11:39 +0300	[thread overview]
Message-ID: <20220511101139.5306-6-ilpo.jarvinen@linux.intel.com> (raw)
In-Reply-To: <20220511101139.5306-1-ilpo.jarvinen@linux.intel.com>

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) {
 		ch->ch_r_head = 0;
 		ch->ch_r_tail = 0;
 		ch->ch_e_head = 0;
diff --git a/drivers/tty/serial/jsm/jsm_neo.c b/drivers/tty/serial/jsm/jsm_neo.c
index 0cf586c10688..95bebf2a73d3 100644
--- a/drivers/tty/serial/jsm/jsm_neo.c
+++ b/drivers/tty/serial/jsm/jsm_neo.c
@@ -938,7 +938,7 @@ static void neo_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) {
 		ch->ch_r_head = ch->ch_r_tail = 0;
 		ch->ch_e_head = ch->ch_e_tail = 0;
 
-- 
2.30.2


  parent reply	other threads:[~2022-05-11 10:12 UTC|newest]

Thread overview: 11+ 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-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 ` Ilpo Järvinen [this message]
2022-05-13  7:14   ` [PATCH 5/5] serial: jsm: Use B0 instead of 0 Johan Hovold

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=20220511101139.5306-6-ilpo.jarvinen@linux.intel.com \
    --to=ilpo.jarvinen@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).