mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] watchdog: gunyah: report system sleep operation failures
@ 2026-10-08 22:34 Zhang Jiaxi
  2026-10-09  1:07 ` Trilok Soni
  0 siblings, 1 reply; 3+ messages in thread
From: Zhang Jiaxi @ 2026-10-08 22:34 UTC (permalink / raw)
  To: Wim Van Sebroeck, Guenter Roeck
  Cc: Bjorn Andersson, Konrad Dybcio, linux-arm-msm, linux-watchdog,
	linux-kernel

From: Jiaxi Zhang <z1529105815@outlook.com>

The system-sleep callbacks discard the errors returned by the watchdog
start and stop operations and always report success. If stopping an
active watchdog fails, the PM core can proceed to suspend while the
watchdog is still counting. Failed restart on resume is also hidden from
the PM core's callback error reporting.

Return the existing operation result when the watchdog is active. Keep
inactive callbacks as no-ops. The start/stop command sequence, initial
activation exception, probe registration and last-resort restart behavior
are unchanged. Reporting a resume error does not implement recovery or
guarantee that watchdog protection has been restored.

Signed-off-by: Jiaxi Zhang <z1529105815@outlook.com>
---
Clang 22.1.8 compiled the changed object on torvalds/linux
6c377d19d4a5116d9bec5203aa3c6c11523e7898 without diagnostics.
Actual callback tests with modeled start/stop returns cover error propagation
and inactive no-ops, including old-code negatives. No device PM or real
hypervisor-error injection is claimed.

 drivers/watchdog/gunyah_wdt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/watchdog/gunyah_wdt.c b/drivers/watchdog/gunyah_wdt.c
--- a/drivers/watchdog/gunyah_wdt.c
+++ b/drivers/watchdog/gunyah_wdt.c
@@ -214,7 +214,7 @@
 	struct watchdog_device *wdd = dev_get_drvdata(dev);
 
 	if (watchdog_active(wdd))
-		gunyah_wdt_stop(wdd);
+		return gunyah_wdt_stop(wdd);
 
 	return 0;
 }
@@ -224,7 +224,7 @@
 	struct watchdog_device *wdd = dev_get_drvdata(dev);
 
 	if (watchdog_active(wdd))
-		gunyah_wdt_start(wdd);
+		return gunyah_wdt_start(wdd);
 
 	return 0;
 }

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

end of thread, other threads:[~2026-10-09  8:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-08 22:34 [PATCH] watchdog: gunyah: report system sleep operation failures Zhang Jiaxi
2026-10-09  1:07 ` Trilok Soni
2026-10-09  8:50   ` Zhang Jiaxi

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

all inboxes | Powered by JetHome®