* [PATCH] serial: tegra: Don't print error on probe deferral
@ 2023-07-03 11:37 Jon Hunter
2023-07-03 15:03 ` Thierry Reding
0 siblings, 1 reply; 2+ messages in thread
From: Jon Hunter @ 2023-07-03 11:37 UTC (permalink / raw)
To: Laxman Dewangan, Greg Kroah-Hartman, Jiri Slaby, Thierry Reding
Cc: linux-serial, linux-tegra, Jon Hunter
If the Tegra serial driver is probe before clocks are available then the
following error is seen on boot:
serial-tegra 3100000.serial: Couldn't get the clock
This has been observed on Jetson AGX Orin. Fix this by calling
dev_err_probe() instead of dev_err() to avoid printing an error on probe
deferral.
Fixes: e9ea096dd225 ("serial: tegra: add serial driver")
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
---
drivers/tty/serial/serial-tegra.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/tty/serial/serial-tegra.c b/drivers/tty/serial/serial-tegra.c
index 1cf08b33456c..848ea53a26bd 100644
--- a/drivers/tty/serial/serial-tegra.c
+++ b/drivers/tty/serial/serial-tegra.c
@@ -1591,10 +1591,8 @@ static int tegra_uart_probe(struct platform_device *pdev)
return PTR_ERR(u->membase);
tup->uart_clk = devm_clk_get(&pdev->dev, NULL);
- if (IS_ERR(tup->uart_clk)) {
- dev_err(&pdev->dev, "Couldn't get the clock\n");
- return PTR_ERR(tup->uart_clk);
- }
+ if (IS_ERR(tup->uart_clk))
+ return dev_err_probe(&pdev->dev, PTR_ERR(tup->uart_clk), "Couldn't get the clock");
tup->rst = devm_reset_control_get_exclusive(&pdev->dev, "serial");
if (IS_ERR(tup->rst)) {
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] serial: tegra: Don't print error on probe deferral
2023-07-03 11:37 [PATCH] serial: tegra: Don't print error on probe deferral Jon Hunter
@ 2023-07-03 15:03 ` Thierry Reding
0 siblings, 0 replies; 2+ messages in thread
From: Thierry Reding @ 2023-07-03 15:03 UTC (permalink / raw)
To: Jon Hunter
Cc: Laxman Dewangan, Greg Kroah-Hartman, Jiri Slaby, linux-serial,
linux-tegra
[-- Attachment #1: Type: text/plain, Size: 1021 bytes --]
On Mon, Jul 03, 2023 at 12:37:59PM +0100, Jon Hunter wrote:
> If the Tegra serial driver is probe before clocks are available then the
> following error is seen on boot:
>
> serial-tegra 3100000.serial: Couldn't get the clock
>
> This has been observed on Jetson AGX Orin. Fix this by calling
> dev_err_probe() instead of dev_err() to avoid printing an error on probe
> deferral.
>
> Fixes: e9ea096dd225 ("serial: tegra: add serial driver")
> Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
> ---
> drivers/tty/serial/serial-tegra.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
Patch looks good to me, though I'm not sure the Fixes: tag is useful. It
points to a commit that is 10 years old and the error message is
probably not worth backporting to every single actively maintained
stable release. I'm not sure it's worth backporting at all because it's
purely cosmetic.
That's up to Greg and Jiri, so from the Tegra side:
Acked-by: Thierry Reding <treding@nvidia.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-07-03 15:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-03 11:37 [PATCH] serial: tegra: Don't print error on probe deferral Jon Hunter
2023-07-03 15:03 ` Thierry Reding
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).