Re: [PATCH 2/3] watchdog: Add Nuvoton MA35D1 watchdog driver support
Guenter Roeck <[email protected]> Thu, 23 Jul 2026 07:07:45 -0700
| Newsgroups | org.kernel.vger.linux-watchdog,dev.linux.lists.sashiko-reviews,org.kernel.vger.linux-devicetree |
|---|---|
| Message-ID | <[email protected]> |
On 7/22/26 23:20, [email protected] wrote: > Thank you for your contribution! Sashiko AI review found 9 potential issue(s) to consider: > - [High] The `ma35d1_wdt->dev` pointer is never initialized, leading to NULL pointer dereferences in logging functions. > - [High] Read-modify-write operations on REG_WDT_CTL inadvertently clear W1C (write-one-to-clear) status flags. > - [High] Missing clock domain synchronization (`ma35d1_wdt_wait_sync`) after writes to `REG_WDT_CTL` can lead to dropped register writes. > - [High] Driver overwrites `wdt_dev->timeout`, breaking the software heartbeat extension. > - [High] Missing cleanup for wake IRQ allocated by dev_pm_set_wake_irq(), leading to a memory leak and permanent device unbind/bind failures. > - [High] The driver fails to check if the watchdog was already enabled by the bootloader, causing unexpected system reboots during boot. > - [Medium] Unsigned integer comparison against zero renders IRQ error handling dead code. > - [Medium] Integer overflow in `target_ticks` calculation triggers unexpected system resets for large timeouts. > - [Low] Unnecessary dependency: selects `MFD_SYSCON` without using it. Please fix or explain why the issues reported by Sashiko are not real. Thanks, Guenter