From: sashiko-bot@kernel.org
To: "Paul Louvel" <paul.louvel@bootlin.com>
Cc: linux-watchdog@vger.kernel.org
Subject: Re: [PATCH 1/2] watchdog: w83627hf_wdt: Add support for Nuvoton NCT6126
Date: Mon, 06 Jul 2026 10:21:58 +0000 [thread overview]
Message-ID: <20260706102159.506A61F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260706-w83627hf_wdt-nct6126d-v1-1-c5b0d51691c6@bootlin.com>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] The newly added `nct6126` chip is missing from the `switch (chip)` statement in `w83627hf_init()`, causing critical hardware watchdog initialization (WDTO# output routing) to be skipped.
- [Low] The macro `NCT6116_ID` is redundantly defined twice in a row with the identical value.
--
commit 0f99926a9f6fc9f6f9e5246a88211f0c8ad46b5b
Author: Paul Louvel <paul.louvel@bootlin.com>
watchdog: w83627hf_wdt: Add support for Nuvoton NCT6126
Add support for the hardware watchdog integrated in the Nuvoton NCT6126
Super I/O chip. This distinguishes the NCT6126 from the NCT6116 by reading
the low byte of the chip ID.
> diff --git a/drivers/watchdog/w83627hf_wdt.c b/drivers/watchdog/w83627hf_wdt.c
> index bc33b63c5a5df..9533baa453841 100644
> --- a/drivers/watchdog/w83627hf_wdt.c
> +++ b/drivers/watchdog/w83627hf_wdt.c
> @@ -49,7 +49,7 @@ static int wdt_cfg_leave = 0xAA;/* key to lock configuration space */
> enum chips { w83627hf, w83627s, w83697hf, w83697ug, w83637hf, w83627thf,
> w83687thf, w83627ehf, w83627dhg, w83627uhg, w83667hg, w83627dhg_p,
> w83667hg_b, nct6775, nct6776, nct6779, nct6791, nct6792, nct6793,
> - nct6795, nct6796, nct6102, nct6116 };
> + nct6795, nct6796, nct6102, nct6116, nct6126 };
>
[Severity: High]
Does this code miss handling the new nct6126 chip in w83627hf_init()?
When w83627hf_init() initializes the watchdog device, it uses a switch
statement on the chip type. Because nct6126 is omitted from the switch cases
in w83627hf_init(), it falls through to the default case:
drivers/watchdog/w83627hf_wdt.c:w83627hf_init() {
...
switch (chip) {
...
case nct6116:
...
t = superio_inb(cr_wdt_control);
t |= 0x02; /* enable the WDTO# output low pulse
* to the KBRST# pin */
superio_outb(cr_wdt_control, t);
break;
default:
break;
}
}
Without nct6126 being added alongside nct6116, the WDTO# output initialization
is skipped. Will this cause the watchdog timer to count down and expire
without successfully triggering a physical system reset?
[ ... ]
> @@ -95,6 +95,9 @@ MODULE_PARM_DESC(early_disable, "Disable watchdog at boot time (default=0)");
> #define NCT6776_ID 0xc3
> #define NCT6102_ID 0xc4
> #define NCT6116_ID 0xd2
> +#define NCT6116_ID 0xd2 /* also NCT6126D */
[Severity: Low]
This isn't a bug, but NCT6116_ID is now defined twice with the exact same
value. Was the intention to just add a comment to the existing definition
instead of redefining it entirely?
> +#define NCT6126_VER_A_LOW_ID 0x83 /* ... version A */
> +#define NCT6126_VER_B_LOW_ID 0x84 /* ... version B */
> #define NCT6779_ID 0xc5
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260706-w83627hf_wdt-nct6126d-v1-0-c5b0d51691c6@bootlin.com?part=1
next prev parent reply other threads:[~2026-07-06 10:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-06 10:14 [PATCH 0/2] watchdog: w83627hf_wdt: Add NCT6126 support and improve handling of running watchdog Paul Louvel
2026-07-06 10:14 ` [PATCH 1/2] watchdog: w83627hf_wdt: Add support for Nuvoton NCT6126 Paul Louvel
2026-07-06 10:21 ` sashiko-bot [this message]
2026-07-06 10:14 ` [PATCH 2/2] watchdog: w83627hf_wdt: Use WDOG_HW_RUNNING for running chip on boot Paul Louvel
2026-07-06 10:32 ` sashiko-bot
2026-07-06 10:19 ` [PATCH 0/2] watchdog: w83627hf_wdt: Add NCT6126 support and improve handling of running watchdog Paul Louvel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260706102159.506A61F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=paul.louvel@bootlin.com \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.