public inbox for linux-serial@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] serial: 8250: Clear dma tx_err unconditionally
@ 2022-08-19 11:00 Ilpo Järvinen
  2022-08-19 22:43 ` Andy Shevchenko
  0 siblings, 1 reply; 2+ messages in thread
From: Ilpo Järvinen @ 2022-08-19 11:00 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Jiri Slaby, linux-serial, Andy Shevchenko

[-- Attachment #1: Type: text/plain, Size: 754 bytes --]

No need to check non-zeroness first and then clear. Just set to zero
unconditionally.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

---
 drivers/tty/serial/8250/8250_dma.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_dma.c b/drivers/tty/serial/8250/8250_dma.c
index a8dba4a0a8fb..d99020fd3427 100644
--- a/drivers/tty/serial/8250/8250_dma.c
+++ b/drivers/tty/serial/8250/8250_dma.c
@@ -107,8 +107,7 @@ int serial8250_tx_dma(struct uart_8250_port *p)
 
 	dma_async_issue_pending(dma->txchan);
 	serial8250_clear_THRI(p);
-	if (dma->tx_err)
-		dma->tx_err = 0;
+	dma->tx_err = 0;
 
 	return 0;
 err:

-- 
tg: (568035b01cfb..) 8250dma/tx_err-clear-unconditionally (depends on: tty-next)

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-08-19 22:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-19 11:00 [PATCH] serial: 8250: Clear dma tx_err unconditionally Ilpo Järvinen
2022-08-19 22:43 ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox