All of lore.kernel.org
 help / color / mirror / Atom feed
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 v4 2/2] net: stmmac: Add glue layer for Synaptics SL2610 SoC
Date: Thu, 03 Dec 2026 15:37:43 +0000	[thread overview]
Message-ID: <sashiko-outbox-248128@kernel.org> (raw)
In-Reply-To: <20261202151531.28480-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 63887fb668b097abce99c504daf5e0a59b68bd54
Author: Jisheng Zhang <jszhang@kernel.org>

net: stmmac: Add glue layer for Synaptics SL2610 SoC

This commit adds a platform glue driver for the DesignWare Ethernet MAC
controllers in the Synaptics SL2610 SoC.

> 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..899b12842bffe
> --- /dev/null
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-syna.c
[ ... ]
> +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 interface name here?

phy_intf_sel is a DWMAC PHY_INTF_SEL_* constant rather than a
phy_interface_t enum value expected by phy_modes(), so an unsupported
interface logs an empty or mismatched mode string (for example,
PHY_INTF_SEL_SGMII logs "mii").  Since the caller
stmmac_prereset_configure() already logs an error with
phy_modes(interface) when set_phy_intf_sel() returns -EINVAL, this
dev_err() could be dropped or passed dwmac->plat->phy_interface.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261202151531.28480-1-jszhang@kernel.org?part=2

      reply	other threads:[~2026-12-03 15:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-02 15:15 [PATCH net-next v4 0/2] net: stmmac: add SL2610 ethernet support Jisheng Zhang
2026-12-02 15:15 ` [PATCH net-next v4 1/2] dt-bindings: net: Add Synaptics SL2610 DWMAC Jisheng Zhang
2026-12-03 15:37   ` sashiko-bot
2026-12-04 13:23   ` Rob Herring
2026-12-02 15:15 ` [PATCH net-next v4 2/2] net: stmmac: Add glue layer for Synaptics SL2610 SoC Jisheng Zhang
2026-12-03 15:37   ` 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-248128@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 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.