From: sashiko-bot@kernel.org
To: "Jisheng Zhang" <jszhang@kernel.org>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH net-next v3 2/2] net: stmmac: Add glue layer for Synaptics SL2610 SoC
Date: Wed, 02 Dec 2026 14:58:42 +0000 [thread overview]
Message-ID: <sashiko-outbox-246026@kernel.org> (raw)
In-Reply-To: <20261201143753.13916-3-jszhang@kernel.org>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] net: stmmac: wrong enum passed to phy_modes() in
syna_dwmac_set_phy_intf_sel()
--
commit 14cec5d5e8a51b1c42650d9c05ead55e12105f72
Author: Jisheng Zhang <jszhang@kernel.org>
net: stmmac: Add glue layer for Synaptics SL2610 SoC
This commit adds a platform glue driver for the Synopsys DesignWare GMAC
controllers on the Synaptics SL2610 SoC, configuring the PHY interface
mode and shared MDIO master selection via a syscon regmap.
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-syna.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-syna.c
> new file mode 100644
> index 0000000000000..b245c6cbed99c
> --- /dev/null
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-syna.c
> @@ -0,0 +1,183 @@
[ ... ]
> +static int syna_dwmac_set_phy_intf_sel(void *bsp_priv, u8 phy_intf_sel)
> +{
> + struct syna_dwmac *dwmac = bsp_priv;
> + u32 phyif;
> +
> + switch (phy_intf_sel) {
> + case PHY_INTF_SEL_RMII:
> + phyif = CTL_PHY_INTF_RMII;
> + break;
> + case PHY_INTF_SEL_RGMII:
> + phyif = CTL_PHY_INTF_RGMII;
> + break;
> + default:
> + dev_err(dwmac->dev, "unsupported phy interface %s\n",
> + phy_modes(phy_intf_sel));
> + return -EINVAL;
> + }
[Severity: Low]
Does phy_modes(phy_intf_sel) log the wrong PHY mode name here?
phy_intf_sel is a DWMAC PHY_INTF_SEL_* value rather than a
phy_interface_t (PHY_INTERFACE_MODE_*) enum, so phy_modes() prints an
empty or mismatched interface name when an unsupported mode is selected
(for instance, PHY_INTF_SEL_GMII_MII is 0, which maps to
PHY_INTERFACE_MODE_NA, and PHY_INTF_SEL_SGMII is 2, which maps to
"mii"). stmmac_prereset_configure() already logs the unsupported mode
with phy_modes(interface) when set_phy_intf_sel() returns -EINVAL, so
this dev_err() can be dropped.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261201143753.13916-1-jszhang@kernel.org?part=2
prev parent reply other threads:[~2026-12-02 14:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-01 14:37 [PATCH net-next v3 0/2] net: stmmac: add SL2610 ethernet support Jisheng Zhang
2026-12-01 14:37 ` [PATCH net-next v3 1/2] dt-bindings: net: Add Synaptics SL2610 DWMAC Jisheng Zhang
2026-12-02 14:58 ` sashiko-bot
2026-12-01 14:37 ` [PATCH net-next v3 2/2] net: stmmac: Add glue layer for Synaptics SL2610 SoC Jisheng Zhang
2026-12-01 17:23 ` Andrew Lunn
2026-12-02 14:58 ` 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=sashiko-outbox-246026@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jszhang@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