All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Aiden Isik" <aidenisik@member.fsf.org>
Cc: conor+dt@kernel.org, linux-watchdog@vger.kernel.org,
	devicetree@vger.kernel.org, robh@kernel.org
Subject: Re: [PATCH 2/2] watchdog: s3c2410_wdt: Add exynos5515-wdt compatible data
Date: Mon, 17 Aug 2026 10:33:54 +0000	[thread overview]
Message-ID: <20260817103354.BB64F1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260817-for-next-lucky7-watchdog-v1-2-a14370e20b92@member.fsf.org>

Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [High] The `drv_data_exynos5515` variant declares `QUIRK_HAS_PMU_AUTO_DISABLE` but fails to initialize `.disable_reg`, causing unintentional writes to PMU offset 0x0000.
- [High] The `drv_data_exynos5515` variant uses an 'INT_EN' register for masking watchdog reset, but omits the `.mask_reset_inv = true` flag, inverting the WDT reset mask logic.
- [Medium] Incorrect use of an Exynos Auto v920 register macro (`EXYNOSAUTOV920_CLUSTER0_NONCPU_INT_EN`) in an Exynos 5515 variant.
--

--- Patch [2]: [PATCH 2/2] watchdog: s3c2410_wdt: Add exynos5515-wdt compatible data ---
commit dcaab4881777bc5f5ce1a532adad7c17046164a8
Author: Aiden Isik <aidenisik@member.fsf.org>

watchdog: s3c2410_wdt: Add exynos5515-wdt compatible data

This commit adds driver data and a compatible string for the Exynos5515
SoC's watchdog timer.

> diff --git a/drivers/watchdog/s3c2410_wdt.c b/drivers/watchdog/s3c2410_wdt.c
> index e31f93db05096..7299dfdb0c099 100644
> --- a/drivers/watchdog/s3c2410_wdt.c
> +++ b/drivers/watchdog/s3c2410_wdt.c

[ ... ]

> @@ -232,6 +232,16 @@ static const struct s3c2410_wdt_variant drv_data_exynos5420 = {
>  		  QUIRK_HAS_PMU_RST_STAT | QUIRK_HAS_PMU_AUTO_DISABLE,
>  };
>  
> +static const struct s3c2410_wdt_variant drv_data_exynos5515 = {
> +	.mask_reset_reg = EXYNOSAUTOV920_CLUSTER0_NONCPU_INT_EN,

[Severity: Medium]
Is this intentionally using an Exynos Auto v920 register macro for an
Exynos 5515 variant, or could this be a copy-paste error?

[Severity: High]
Since this variant uses an INT_EN register for masking the reset, should
the .mask_reset_inv = true flag be set here?

Without the inversion flag, the bitwise masking logic in
s3c2410wdt_mask_wdt_reset() evaluates to (mask ^ false). For INT_EN
registers, this typically writes 1 when intending to mask the reset, and 0
when intending to unmask it, effectively inverting the logic.

> +	.mask_bit = 2,
> +	.rst_stat_reg = EXYNOS5_RST_STAT_REG_OFFSET,
> +	.rst_stat_bit = 24,
> +	.quirks = QUIRK_HAS_WTCLRINT_REG | QUIRK_HAS_PMU_MASK_RESET | \
> +		  QUIRK_HAS_PMU_RST_STAT | QUIRK_HAS_PMU_AUTO_DISABLE | \
> +		  QUIRK_HAS_DBGACK_BIT,
> +};

[Severity: High]
Will this cause unintentional writes to offset 0x0000 of the PMU regmap?

This variant declares QUIRK_HAS_PMU_AUTO_DISABLE but omits .disable_reg.
Since struct fields default to zero, when s3c2410wdt_enable() checks for
this quirk and calls s3c2410wdt_disable_wdt_reset() during driver probe:

s3c2410wdt_disable_wdt_reset()
    regmap_update_bits(wdt->pmureg, wdt->drv_data->disable_reg, mask_val, val);

regmap_update_bits() will blindly write to offset 0x0000.

[ ... ]

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260817-for-next-lucky7-watchdog-v1-0-a14370e20b92@member.fsf.org?part=2

  reply	other threads:[~2026-08-17 10:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-17 10:22 [PATCH 0/2] watchdog: Add Exynos5515 watchdog timer support Aiden Isik via B4 Relay
2026-08-17 10:22 ` Aiden Isik
2026-08-17 10:22 ` [PATCH 1/2] dt-bindings: watchdog: samsung-wdt: Add exynos5515-wdt compatible Aiden Isik via B4 Relay
2026-08-17 10:22   ` Aiden Isik
2026-08-17 10:26   ` sashiko-bot
2026-08-17 11:06     ` Aiden Isik
2026-08-17 10:22 ` [PATCH 2/2] watchdog: s3c2410_wdt: Add exynos5515-wdt compatible data Aiden Isik via B4 Relay
2026-08-17 10:22   ` Aiden Isik
2026-08-17 10:33   ` sashiko-bot [this message]
2026-08-17 11:08     ` Aiden Isik

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=20260817103354.BB64F1F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=aidenisik@member.fsf.org \
    --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 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.