From: Clement Smith <rclemsmith@gmail.com>
To: gregkh@linuxfoundation.org
Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org,
Clement Smith <rclemsmith@gmail.com>
Subject: [PATCH] tty: serial: jsm : jsm_tty.c : fixed file by adding spacing and removing assignment in if statement
Date: Tue, 1 Dec 2020 16:26:02 +0530 [thread overview]
Message-ID: <20201201105602.465899-1-rclemsmith@gmail.com> (raw)
Fixed a coding style issue
Signed-off-by: Clement Smith <rclemsmith@gmail.com>
---
drivers/tty/serial/jsm/jsm_tty.c | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/drivers/tty/serial/jsm/jsm_tty.c b/drivers/tty/serial/jsm/jsm_tty.c
index 689774c073ca..047e962a4529 100644
--- a/drivers/tty/serial/jsm/jsm_tty.c
+++ b/drivers/tty/serial/jsm/jsm_tty.c
@@ -607,14 +607,14 @@ void jsm_input(struct jsm_channel *ch)
* Give the Linux ld the flags in the
* format it likes.
*/
- if (*(ch->ch_equeue +tail +i) & UART_LSR_BI)
- tty_insert_flip_char(port, *(ch->ch_rqueue +tail +i), TTY_BREAK);
- else if (*(ch->ch_equeue +tail +i) & UART_LSR_PE)
- tty_insert_flip_char(port, *(ch->ch_rqueue +tail +i), TTY_PARITY);
- else if (*(ch->ch_equeue +tail +i) & UART_LSR_FE)
- tty_insert_flip_char(port, *(ch->ch_rqueue +tail +i), TTY_FRAME);
+ if (*(ch->ch_equeue + tail + i) & UART_LSR_BI)
+ tty_insert_flip_char(port, *(ch->ch_rqueue + tail + i), TTY_BREAK);
+ else if (*(ch->ch_equeue + tail + i) & UART_LSR_PE)
+ tty_insert_flip_char(port, *(ch->ch_rqueue + tail + i), TTY_PARITY);
+ else if (*(ch->ch_equeue + tail + i) & UART_LSR_FE)
+ tty_insert_flip_char(port, *(ch->ch_rqueue + tail + i), TTY_FRAME);
else
- tty_insert_flip_char(port, *(ch->ch_rqueue +tail +i), TTY_NORMAL);
+ tty_insert_flip_char(port, *(ch->ch_rqueue + tail + i), TTY_NORMAL);
}
} else {
tty_insert_flip_string(port, ch->ch_rqueue + tail, s);
@@ -742,7 +742,8 @@ void jsm_check_queue_flow_control(struct jsm_channel *ch)
int qleft;
/* Store how much space we have left in the queue */
- if ((qleft = ch->ch_r_tail - ch->ch_r_head - 1) < 0)
+ qleft = ch->ch_r_tail - ch->ch_r_head - 1;
+ if (qleft < 0)
qleft += RQUEUEMASK + 1;
/*
--
2.27.0
next reply other threads:[~2020-12-01 10:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-01 10:56 Clement Smith [this message]
2020-12-01 18:09 ` [PATCH] tty: serial: jsm : jsm_tty.c : fixed file by adding spacing and removing assignment in if statement Greg KH
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=20201201105602.465899-1-rclemsmith@gmail.com \
--to=rclemsmith@gmail.com \
--cc=gregkh@linuxfoundation.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).