Re: [PATCH] watchdog: gunyah: report system sleep operation failures
From: Trilok Soni
Date: Thu Oct 08 2026 - 21:07:19 EST
On 10/8/2026 3:34 PM, Zhang Jiaxi wrote:
> From: Jiaxi Zhang <z1529105815@xxxxxxxxxxx>
>
> 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@xxxxxxxxxxx>
I see flurry of emails from you. What exactly are you testing here? Is this driven
through LLM?
Please also fix your SOB line.
> ---
> 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;
> }
>