From: B K Karthik <bkkarthik@pesu.pes.edu>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jirislaby@kernel.org>,
linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] tty: serial: fsl_lpuart.c: fix a parentheses coding style issue
Date: Tue, 21 Jul 2020 22:44:12 +0530 [thread overview]
Message-ID: <20200721171412.xfpzswsrjn7savco@pesu.pes.edu> (raw)
[-- Attachment #1: Type: text/plain, Size: 926 bytes --]
add parentheses to expression to improve
code readability.
Signed-off-by: B K Karthik <bkkarthik@pesu.pes.edu>
---
drivers/tty/serial/fsl_lpuart.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c
index 0cc64279cd2d..3108f5ab57fa 100644
--- a/drivers/tty/serial/fsl_lpuart.c
+++ b/drivers/tty/serial/fsl_lpuart.c
@@ -1167,7 +1167,7 @@ static inline int lpuart_start_rx_dma(struct lpuart_port *sport)
* Calculate length of one DMA buffer size to keep latency below
* 10ms at any baud rate.
*/
- sport->rx_dma_rng_buf_len = (DMA_RX_TIMEOUT * baud / bits / 1000) * 2;
+ sport->rx_dma_rng_buf_len = (((DMA_RX_TIMEOUT * baud) / bits) / 1000) * 2;
if (sport->rx_dma_rng_buf_len != 0)
sport->rx_dma_rng_buf_len = (1 << (fls(sport->rx_dma_rng_buf_len) - 1));
if (sport->rx_dma_rng_buf_len < 16)
--
2.20.1
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
next reply other threads:[~2020-07-21 17:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-21 17:14 B K Karthik [this message]
2020-07-21 17:33 ` [PATCH 2/2] tty: serial: fsl_lpuart.c: fix a parentheses coding style issue Greg Kroah-Hartman
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=20200721171412.xfpzswsrjn7savco@pesu.pes.edu \
--to=bkkarthik@pesu.pes.edu \
--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).