From: Jiri Slaby <jirislaby@kernel.org>
To: Sherry Sun <sherry.sun@nxp.com>, gregkh@linuxfoundation.org
Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-imx@nxp.com
Subject: Re: [PATCH V2] tty: serial: fsl_lpuart: count tty buffer overruns
Date: Tue, 11 Jan 2022 09:29:09 +0100 [thread overview]
Message-ID: <7b6faabc-bbf9-2d93-274a-93df725e4aca@kernel.org> (raw)
In-Reply-To: <20220111082229.5117-1-sherry.sun@nxp.com>
On 11. 01. 22, 9:22, Sherry Sun wrote:
> Added support for counting the tty buffer overruns in fsl_lpuart driver
> like other uart drivers.
>
> Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
>
> ---
> changes in V2
> 1. Change the copied type to int to avoid implicit conversion, as the
> tty_insert_flip_string return type is int.
> ---
> drivers/tty/serial/fsl_lpuart.c | 20 +++++++++++++-------
> 1 file changed, 13 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c
> index ce3e26144689..82a1a2817750 100644
> --- a/drivers/tty/serial/fsl_lpuart.c
> +++ b/drivers/tty/serial/fsl_lpuart.c
...
> @@ -1116,7 +1118,7 @@ static void lpuart_copy_rx_to_tty(struct lpuart_port *sport)
> struct dma_chan *chan = sport->dma_rx_chan;
> struct circ_buf *ring = &sport->rx_ring;
> unsigned long flags;
> - int count = 0;
> + int count = 0, copied = 0;
Why is it necessary to initialize copied?
Actually neither count needs to be initialized AFAICT. Care to fix that
too (in a separate patch).
thanks,
--
js
suse labs
next prev parent reply other threads:[~2022-01-11 8:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-11 8:22 [PATCH V2] tty: serial: fsl_lpuart: count tty buffer overruns Sherry Sun
2022-01-11 8:29 ` Jiri Slaby [this message]
2022-01-11 8:46 ` Sherry Sun
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=7b6faabc-bbf9-2d93-274a-93df725e4aca@kernel.org \
--to=jirislaby@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=sherry.sun@nxp.com \
/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).