public inbox for linux-usb@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] thunderbolt: log path activation failures without WARN backtraces
@ 2026-01-02  3:19 Chia-Lin Kao (AceLan)
  2026-01-05 11:16 ` Mika Westerberg
  0 siblings, 1 reply; 2+ messages in thread
From: Chia-Lin Kao (AceLan) @ 2026-01-02  3:19 UTC (permalink / raw)
  To: Andreas Noever, Mika Westerberg, Yehezkel Bernat, linux-usb,
	linux-kernel

tb_path_activate() currently logs failures with tb_WARN(), which triggers
a stack trace. Transient conditions such as lane bonding or Type-C link
hiccups can fail path activation briefly, and the resulting backtraces are
noisy without aiding diagnosis.

Switch to tb_warn() for all path activation failures. The error code is
already returned to callers, and the warning still shows the message
without the backtrace.

Signed-off-by: Chia-Lin Kao (AceLan) <acelan.kao@canonical.com>
---
 drivers/thunderbolt/path.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/thunderbolt/path.c b/drivers/thunderbolt/path.c
index f9b11dadfbdd..50659bd55d7b 100644
--- a/drivers/thunderbolt/path.c
+++ b/drivers/thunderbolt/path.c
@@ -586,7 +586,7 @@ int tb_path_activate(struct tb_path *path)
 	tb_dbg(path->tb, "%s path activation complete\n", path->name);
 	return 0;
 err:
-	tb_WARN(path->tb, "%s path activation failed\n", path->name);
+	tb_warn(path->tb, "%s path activation failed: %d\n", path->name, res);
 	return res;
 }
 
-- 
2.43.0


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

* Re: [PATCH] thunderbolt: log path activation failures without WARN backtraces
  2026-01-02  3:19 [PATCH] thunderbolt: log path activation failures without WARN backtraces Chia-Lin Kao (AceLan)
@ 2026-01-05 11:16 ` Mika Westerberg
  0 siblings, 0 replies; 2+ messages in thread
From: Mika Westerberg @ 2026-01-05 11:16 UTC (permalink / raw)
  To: Chia-Lin Kao (AceLan)
  Cc: Andreas Noever, Mika Westerberg, Yehezkel Bernat, linux-usb,
	linux-kernel

On Fri, Jan 02, 2026 at 11:19:05AM +0800, Chia-Lin Kao (AceLan) wrote:
> tb_path_activate() currently logs failures with tb_WARN(), which triggers
> a stack trace. Transient conditions such as lane bonding or Type-C link
> hiccups can fail path activation briefly, and the resulting backtraces are
> noisy without aiding diagnosis.
> 
> Switch to tb_warn() for all path activation failures. The error code is
> already returned to callers, and the warning still shows the message
> without the backtrace.
> 
> Signed-off-by: Chia-Lin Kao (AceLan) <acelan.kao@canonical.com>

Applied to thunderbolt.git/next, thanks!

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

end of thread, other threads:[~2026-01-05 11:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-02  3:19 [PATCH] thunderbolt: log path activation failures without WARN backtraces Chia-Lin Kao (AceLan)
2026-01-05 11:16 ` Mika Westerberg

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