All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V2] serial: tegra: Only print FIFO error message when an error occurs
@ 2021-06-30 12:56 Jon Hunter
  2021-06-30 17:25 ` Thierry Reding
  2021-07-08 22:25 ` Michał Mirosław
  0 siblings, 2 replies; 7+ messages in thread
From: Jon Hunter @ 2021-06-30 12:56 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Jiri Slaby, Thierry Reding
  Cc: Laxman Dewangan, Krishna Yarlagadda, linux-serial, linux-tegra,
	Jon Hunter, stable

The Tegra serial driver always prints an error message when enabling the
FIFO for devices that have support for checking the FIFO enable status.
Fix this by displaying the error message, only when an error occurs.

Finally, update the error message to make it clear that enabling the
FIFO failed and display the error code.

Fixes: 222dcdff3405 ("serial: tegra: check for FIFO mode enabled status")
Cc: <stable@vger.kernel.org>
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
---
Changes since V1:
- Updated the error message to make it more meaningful.

drivers/tty/serial/serial-tegra.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/serial/serial-tegra.c b/drivers/tty/serial/serial-tegra.c
index 222032792d6c..eba5b9ecba34 100644
--- a/drivers/tty/serial/serial-tegra.c
+++ b/drivers/tty/serial/serial-tegra.c
@@ -1045,9 +1045,11 @@ static int tegra_uart_hw_init(struct tegra_uart_port *tup)
 
 	if (tup->cdata->fifo_mode_enable_status) {
 		ret = tegra_uart_wait_fifo_mode_enabled(tup);
-		dev_err(tup->uport.dev, "FIFO mode not enabled\n");
-		if (ret < 0)
+		if (ret < 0) {
+			dev_err(tup->uport.dev,
+				"Failed to enable FIFO mode: %d\n", ret);
 			return ret;
+		}
 	} else {
 		/*
 		 * For all tegra devices (up to t210), there is a hardware
-- 
2.25.1


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

end of thread, other threads:[~2021-07-09 21:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-30 12:56 [PATCH V2] serial: tegra: Only print FIFO error message when an error occurs Jon Hunter
2021-06-30 17:25 ` Thierry Reding
2021-07-08 22:25 ` Michał Mirosław
2021-07-09  8:34   ` Jon Hunter
2021-07-09 11:38     ` Jon Hunter
2021-07-09 17:55       ` Michał Mirosław
2021-07-09 21:38         ` Dmitry Osipenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.