From: Jiri Slaby <jirislaby@kernel.org>
To: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] serial: sh-sci: tail is already on valid range
Date: Tue, 30 Aug 2022 08:46:01 +0200 [thread overview]
Message-ID: <4696090f-d459-61dc-1707-3a17760406c9@kernel.org> (raw)
In-Reply-To: <20220823141839.165244-2-ilpo.jarvinen@linux.intel.com>
On 23. 08. 22, 16:18, Ilpo Järvinen wrote:
> There is no need to and tail with UART_XMIT_SIZE - 1 because tail is
> already on valid range.
Reviewed-by: Jiri Slaby <jirislaby@kernel.org>
> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
> ---
> drivers/tty/serial/sh-sci.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
> index 6d2f5a08ff1f..2ddcd7eec71e 100644
> --- a/drivers/tty/serial/sh-sci.c
> +++ b/drivers/tty/serial/sh-sci.c
> @@ -1407,7 +1407,7 @@ static void sci_dma_tx_work_fn(struct work_struct *work)
> spin_lock_irq(&port->lock);
> head = xmit->head;
> tail = xmit->tail;
> - buf = s->tx_dma_addr + (tail & (UART_XMIT_SIZE - 1));
> + buf = s->tx_dma_addr + tail;
> s->tx_dma_len = CIRC_CNT_TO_END(head, tail, UART_XMIT_SIZE);
> if (!s->tx_dma_len) {
> /* Transmit buffer has been flushed */
--
js
suse labs
next prev parent reply other threads:[~2022-08-30 6:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-23 14:18 [PATCH 1/3] serial: sh-sci: CIRC_CNT_TO_END() is enough Ilpo Järvinen
2022-08-23 14:18 ` [PATCH 2/3] serial: sh-sci: tail is already on valid range Ilpo Järvinen
2022-08-30 6:46 ` Jiri Slaby [this message]
2022-08-23 14:18 ` [PATCH 3/3] serial: pch_uart: CIRC_CNT_TO_END() is enough Ilpo Järvinen
2022-08-30 6:46 ` Jiri Slaby
2022-08-30 6:45 ` [PATCH 1/3] serial: sh-sci: " Jiri Slaby
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=4696090f-d459-61dc-1707-3a17760406c9@kernel.org \
--to=jirislaby@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=ilpo.jarvinen@linux.intel.com \
--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
all inboxes | Powered by JetHome®