From: sashiko-bot@kernel.org
To: "Congcong Yao" <congcong.yao@mediatek.com>
Cc: robh@kernel.org, devicetree@vger.kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH RESEND v3 1/2] memory: mtk-smi: Add mt8189 support
Date: Wed, 22 Jul 2026 12:19:59 +0000 [thread overview]
Message-ID: <20260722121959.89B0C1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260722-8189-smi-support-v3-1-ae00e13deeac@mediatek.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] The newly added mt8189 OSTD port configurations contain explicit 0x0 values which cause the port configuration loop to terminate prematurely, silently skipping the configuration of subsequent ports.
--
--- Patch [1]: [PATCH RESEND v3 1/2] memory: mtk-smi: Add mt8189 support ---
commit 8db8065406833f4c96be551356fd00685313a57d
Author: Congcong Yao <congcong.yao@mediatek.com>
memory: mtk-smi: Add mt8189 support
Add the necessary platform data and ostdl setting to enable support
for mt8189 smi.
> diff --git a/drivers/memory/mtk-smi.c b/drivers/memory/mtk-smi.c
> index aaeba8ab211e9..f2d5462af6817 100644
> --- a/drivers/memory/mtk-smi.c
> +++ b/drivers/memory/mtk-smi.c
[ ... ]
> @@ -401,6 +401,30 @@ static const u8 mtk_smi_larb_mt8188_ostd[][SMI_LARB_PORT_NR_MAX] = {
> [25] = {0x01},
> };
>
> +static const u8 mtk_smi_larb_mt8189_ostd[][SMI_LARB_PORT_NR_MAX] = {
> + [0] = {0x8, 0x20, 0x20, 0x20, 0x20, 0x20, 0x10, 0x0,},
> + [1] = {0x8, 0x20, 0x20, 0x20, 0x20, 0x20, 0x10, 0x0,},
> + [2] = {0x7, 0x7, 0x4, 0x4, 0x0, 0x0, 0x2, 0x2, 0x7, 0x7, 0x0,},
[Severity: High]
Will these explicit 0x0 values cause the configuration loop to exit early?
In mtk_smi_larb_config_port_gen2_general(), the loop relies on !!larbostd[i]
to terminate:
drivers/memory/mtk-smi.c:mtk_smi_larb_config_port_gen2_general() {
...
for (i = 0; i < SMI_LARB_PORT_NR_MAX && larbostd && !!larbostd[i]; i++)
writel_relaxed(larbostd[i], larb->base + SMI_LARB_OSTDL_PORTx(i));
...
}
Because mtk_smi_larb_mt8189_ostd[2] contains 0x0 values at indices 4 and 5,
could the loop exit prematurely, silently skipping the valid configuration
values (0x2, 0x2, 0x7, 0x7) for ports 6 through 9?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260722-8189-smi-support-v3-0-ae00e13deeac@mediatek.com?part=1
next prev parent reply other threads:[~2026-07-22 12:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-22 12:02 [PATCH RESEND v3 0/2] memory: mtk-smi: add MT8189 SMI support Congcong Yao via B4 Relay
2026-07-22 12:02 ` [PATCH RESEND v3 1/2] memory: mtk-smi: Add mt8189 support Congcong Yao via B4 Relay
2026-07-22 12:19 ` sashiko-bot [this message]
2026-07-22 12:02 ` [PATCH RESEND v3 2/2] dt-bindings: memory-controllers: mtk-smi: Add support for mt8189 Congcong Yao via B4 Relay
2026-07-22 12:12 ` sashiko-bot
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=20260722121959.89B0C1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=congcong.yao@mediatek.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@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