From: Erwan Le Ray Date: Wed, 6 Jan 2021 16:22:03 +0000 (+0100) Subject: serial: stm32: update transmission complete error message in shutdown X-Git-Tag: v5.15~1779^2~25 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c31c3ea02e218998da19f4cd6b7d86eb6e873df4;p=platform%2Fkernel%2Flinux-starfive.git serial: stm32: update transmission complete error message in shutdown The transmission complete error message provides the status of the ISR_USART_TC bit. This bit, when set, indicates that the transmission has not been completed. The bit status indication is not a very understandable information. The error message sent on console should indicate that the transmission is not complete, instead of providing USART_TC bit status. Update the error message and add a comment for better understanding. Signed-off-by: Erwan Le Ray Link: https://lore.kernel.org/r/20210106162203.28854-9-erwan.leray@foss.st.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/serial/stm32-usart.c b/drivers/tty/serial/stm32-usart.c index 9d73f69..6a9a5ef 100644 --- a/drivers/tty/serial/stm32-usart.c +++ b/drivers/tty/serial/stm32-usart.c @@ -687,8 +687,9 @@ static void stm32_usart_shutdown(struct uart_port *port) isr, (isr & USART_SR_TC), 10, 100000); + /* Send the TC error message only when ISR_TC is not set */ if (ret) - dev_err(port->dev, "transmission complete not set\n"); + dev_err(port->dev, "Transmission is not complete\n"); stm32_usart_clr_bits(port, ofs->cr1, val);