From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: linux-serial@vger.kernel.org,
Greg KH <gregkh@linuxfoundation.org>,
Johan Hovold <johan@kernel.org>,
Jiri Slaby <jirislaby@kernel.org>,
linux-kernel@vger.kernel.org
Cc: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Subject: [PATCH v2 5/5] serial: jsm: Use B0 instead of 0
Date: Fri, 13 May 2022 11:29:06 +0300 [thread overview]
Message-ID: <20220513082906.11096-6-ilpo.jarvinen@linux.intel.com> (raw)
In-Reply-To: <20220513082906.11096-1-ilpo.jarvinen@linux.intel.com>
Use B0 to check zero baudrate rather than literal 0.
While at it, remove extra parenthesis around CBAUD.
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..3fd57ac3ad81 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..0c78f66276cd 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
next prev parent reply other threads:[~2022-05-13 8:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-13 8:29 [PATCH v2 0/5] tty/serial: termbits cleanups Ilpo Järvinen
2022-05-13 8:29 ` [PATCH v2 1/5] tty: remove CMSPAR ifdefs Ilpo Järvinen
2022-05-13 8:29 ` [PATCH v2 2/5] tty: remove BOTHER ifdefs Ilpo Järvinen
2022-05-13 8:29 ` [PATCH v2 3/5] tty: remove IBSHIFT ifdefs Ilpo Järvinen
2022-05-13 8:29 ` [PATCH v2 4/5] serial: fsl_lpuart: Remove unnecessary clearing for CRTSCTS Ilpo Järvinen
2022-05-13 8:29 ` Ilpo Järvinen [this message]
2022-05-13 8:34 ` [PATCH v2 0/5] tty/serial: termbits cleanups 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=20220513082906.11096-6-ilpo.jarvinen@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=johan@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