Linux Watchdog driver development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Alim Akhtar" <alim.akhtar@samsung.com>
Cc: devicetree@vger.kernel.org, linux-watchdog@vger.kernel.org,
	conor+dt@kernel.org, robh@kernel.org
Subject: Re: [PATCH 2/2] watchdog: s3c2410_wdt: Add support for Exynos8855 SoC
Date: Sun, 27 Sep 2026 14:21:13 +0000	[thread overview]
Message-ID: <20260927142113.9C6621F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260927143100.3576195-2-alim.akhtar@samsung.com>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Low] watchdog: confusing reuse of CLUSTER0 macro for CLUSTER1
- [Low] watchdog: space-based alignment for EXYNOS8855_RST_STAT_REG_OFFSET
--

commit fec6f94918dfbe88ae7146d760500426231edbc3
Author: Alim Akhtar <alim.akhtar@samsung.com>

watchdog: s3c2410_wdt: Add support for Exynos8855 SoC

Watchdog IP on this SoC is similar to Exynos850/ExynosAutov{9/920}.
This does not have CNT_EN_WDT bit in PMU and offset of RST_STAT is
different then the previously support SoC.
Reuse the offset as much as from already supported SoC

> diff --git a/drivers/watchdog/s3c2410_wdt.c b/drivers/watchdog/s3c2410_wdt.c
> index 7053963fb0ac6..8ce4ca3e2aa81 100644
> --- a/drivers/watchdog/s3c2410_wdt.c
> +++ b/drivers/watchdog/s3c2410_wdt.c
> @@ -58,6 +58,7 @@
>  #define S3C2410_WATCHDOG_DEFAULT_TIME	(15)
>  
>  #define EXYNOS5_RST_STAT_REG_OFFSET		0x0404
> +#define EXYNOS8855_RST_STAT_REG_OFFSET          0x10
                                          ^^^^^^^^^^
[Severity: Low]
Does this new macro intentionally use space-based alignment here?

The surrounding macros seem to use tabs for alignment. Using spaces deviates
from the standard tab-based formatting.

>  #define EXYNOS5_WDT_DISABLE_REG_OFFSET		0x0408
>  #define EXYNOS5_WDT_MASK_RESET_REG_OFFSET	0x040c

[ ... ]

> @@ -281,6 +282,26 @@ static const struct s3c2410_wdt_variant drv_data_exynos850_cl1 = {
>  		  QUIRK_HAS_PMU_RST_STAT | QUIRK_HAS_PMU_CNT_EN,
>  };
>  
> +static const struct s3c2410_wdt_variant drv_data_exynos8855_cl0 = {
> +	.mask_reset_reg = EXYNOS850_CLUSTER0_NONCPU_INT_EN,
> +	.mask_bit = 2,
> +	.mask_reset_inv = true,
> +	.rst_stat_reg = EXYNOS8855_RST_STAT_REG_OFFSET,
> +	.rst_stat_bit = EXYNOS850_CLUSTER0_WDTRESET_BIT,
> +	.quirks = QUIRK_HAS_WTCLRINT_REG | QUIRK_HAS_PMU_MASK_RESET |
> +		  QUIRK_HAS_PMU_RST_STAT | QUIRK_HAS_DBGACK_BIT,
> +};
> +
> +static const struct s3c2410_wdt_variant drv_data_exynos8855_cl1 = {
> +	.mask_reset_reg = EXYNOSAUTOV920_CLUSTER1_NONCPU_INT_EN,
> +	.mask_bit = 2,
> +	.mask_reset_inv = true,
> +	.rst_stat_reg = EXYNOS8855_RST_STAT_REG_OFFSET,
> +	.rst_stat_bit = EXYNOSAUTOV9_CLUSTER0_WDTRESET_BIT,
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

[Severity: Low]
Is it intentional to use a CLUSTER0 macro from an unrelated SoC to define the
reset status bit for a cluster 1 configuration?

Even if the underlying hardware bit value is correct and allows reuse, applying
a CLUSTER0 macro here is misleading and looks like a potential copy-paste typo.
Could this result in a functional logic error if the status bit for cluster 1
is actually supposed to be different?

> +	.quirks = QUIRK_HAS_WTCLRINT_REG | QUIRK_HAS_PMU_MASK_RESET |
> +		  QUIRK_HAS_PMU_RST_STAT | QUIRK_HAS_DBGACK_BIT,
> +};
> +

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260927143100.3576195-1-alim.akhtar@samsung.com?part=2

      reply	other threads:[~2026-09-27 14:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20260927141253epcas5p371d497edc6756f13ce2215af4f380fb4@epcas5p3.samsung.com>
2026-09-27 14:30 ` [PATCH 1/2] dt-bindings: watchdog: Add Exynos8855 watchdog compatible string Alim Akhtar
2026-09-27 14:20   ` sashiko-bot
2026-09-27 14:31   ` [PATCH 2/2] watchdog: s3c2410_wdt: Add support for Exynos8855 SoC Alim Akhtar
2026-09-27 14:21     ` sashiko-bot [this message]

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=20260927142113.9C6621F000FF@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=alim.akhtar@samsung.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=robh@kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox