Devicetree
 help / color / mirror / Atom feed
* Re: [PATCH v6 2/3] soc: mediatek: mtk-pmic-pwrap: Skip WDT source and init on arbiter SoCs
       [not found] ` <20261205014926.58916-3-iasnezhkov@gmail.com>
@ 2026-12-05  1:59   ` sashiko-bot
  0 siblings, 0 replies; only message in thread
From: sashiko-bot @ 2026-12-05  1:59 UTC (permalink / raw)
  To: Ilia Snezhkov; +Cc: devicetree, robh, conor+dt

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-12-05  1:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20261205014926.58916-1-iasnezhkov@gmail.com>
     [not found] ` <20261205014926.58916-3-iasnezhkov@gmail.com>
2026-12-05  1:59   ` [PATCH v6 2/3] soc: mediatek: mtk-pmic-pwrap: Skip WDT source and init on arbiter SoCs sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox