Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Ilia Snezhkov" <iasnezhkov@gmail.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v6 2/3] soc: mediatek: mtk-pmic-pwrap: Skip WDT source and init on arbiter SoCs
Date: Sat, 05 Dec 2026 01:59:25 +0000	[thread overview]
Message-ID: <sashiko-outbox-250921@kernel.org> (raw)
In-Reply-To: <20261205014926.58916-3-iasnezhkov@gmail.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] soc: mediatek: commit message misstates PWRAP_WDT_SRC_EN_1
  behavior
--

commit 93fd92c03533ad156a501191b1868701bbd3f7fe
Author: Ilia Snezhkov <iasnezhkov@gmail.com>

soc: mediatek: mtk-pmic-pwrap: Skip WDT source and init on arbiter SoCs

This commit extends the PWRAP_CAP_ARB guard in pwrap_probe() to skip the
pwrap_init() fallback and the PWRAP_WDT_SRC_EN and PWRAP_WDT_SRC_EN_1
writes on arbiter SoCs.

> However, pwrap_probe() only guarded PWRAP_WDT_UNIT with
> !HAS_CAP(wrp->master->caps, PWRAP_CAP_ARB), leaving the writes to
> PWRAP_WDT_SRC_EN and PWRAP_WDT_SRC_EN_1 unconditional. Because omitted
> entries in static const int regs[] default to 0, those writes land at
> offset 0x0 (PWRAP_INIT_DONE2) and overwrite it with wdt_src
> (0xffffffff) on every probe.

[Severity: Low]
Is this description accurate for PWRAP_WDT_SRC_EN_1?

pwrap_probe() already gates PWRAP_WDT_SRC_EN_1 with PWRAP_CAP_WDT_SRC1,
which neither pwrap_mt6873 nor pwrap_mt8195 sets, so only PWRAP_WDT_SRC_EN
was written on probe.

In addition, PWRAP_WDT_SRC_EN_1 lies past the last initialized entry in
mt6873_regs[] and mt8195_regs[], so indexing it would read out of bounds
rather than yielding offset 0x0.

The commit message could be tightened to note that only PWRAP_WDT_SRC_EN
was written unconditionally while PWRAP_WDT_SRC_EN_1 is moved into the
same block for consistency.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261205014926.58916-1-iasnezhkov@gmail.com?part=2

           reply	other threads:[~2026-12-05  1:59 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20261205014926.58916-3-iasnezhkov@gmail.com>]

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=sashiko-outbox-250921@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=iasnezhkov@gmail.com \
    --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