aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>2022-08-23 17:18:38 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-08-30 14:23:05 +0200
commit575ca2cb89ea1dafc4005a208e77e7cd3f3edb40 (patch)
tree0068f99beecd1fcd56b9f687bdab53a25fd52f28 /drivers/tty
parentserial: sh-sci: CIRC_CNT_TO_END() is enough (diff)
downloadlinux-dev-575ca2cb89ea1dafc4005a208e77e7cd3f3edb40.tar.xz
linux-dev-575ca2cb89ea1dafc4005a208e77e7cd3f3edb40.zip
serial: sh-sci: tail is already on valid range
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> Link: https://lore.kernel.org/r/20220823141839.165244-2-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/sh-sci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
index cd41fe069b89..62f773286d44 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 */