From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Andrew Lunn <andrew@lunn.ch>,
Alexandre Torgue <alexandre.torgue@foss.st.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Heiko Stuebner <heiko@sntech.de>,
linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org,
linux-stm32@st-md-mailman.stormreply.com, netdev@vger.kernel.org,
Paolo Abeni <pabeni@redhat.com>
Subject: Re: [PATCH net-next 01/10] net: stmmac: rk: convert to mask-based interface mode configuration
Date: Sat, 31 Jan 2026 23:27:48 +0000 [thread overview]
Message-ID: <aX6P9D99Xi4PnI2J@shell.armlinux.org.uk> (raw)
In-Reply-To: <20260131140850.3c35f95a@kernel.org>
On Sat, Jan 31, 2026 at 02:08:50PM -0800, Jakub Kicinski wrote:
> On Fri, 30 Jan 2026 11:00:14 +0000 Russell King (Oracle) wrote:
> > + ret = rk_get_phy_intf_sel(bsp_priv->phy_iface);
> > + if (ret < 0)
> > + return ret;
> > +
> > + intf = ret;
> > +
> > ret = gmac_clk_enable(bsp_priv, true);
> > if (ret)
> > return ret;
> >
> > + if (bsp_priv->gmac_phy_intf_sel_mask ||
> > + bsp_priv->gmac_rmii_mode_mask) {
> > + /* If defined, encode the phy_intf_sel value */
> > + val = rk_encode_wm16(intf, bsp_priv->gmac_phy_intf_sel_mask);
> > +
> > + /* If defined, encode the RMII mode mask setting. */
> > + val |= rk_encode_wm16(intf == PHY_INTF_SEL_RMII,
> > + bsp_priv->gmac_rmii_mode_mask);
> > +
> > + ret = regmap_write(bsp_priv->grf, bsp_priv->gmac_grf_reg, val);
> > + if (ret < 0)
>
> missing
> gmac_clk_enable(bsp_priv, false);
> here?
Opinions vary on whether errors from regmap_write() should be handled.
See the recent thread:
https://lore.kernel.org/r/aXh9lcfw6D6KouI_@stanley.mountain
Seems that if regmap_write() fails, it's "buy a new computer" realms.
If that's case, is it worth cleaning up resources, or even checking the
return code from regmap_write() ?
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
next prev parent reply other threads:[~2026-01-31 23:28 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-30 10:59 [PATCH net-next 00/10] net: stmmac: rk: cleanups v3: mode and speed for most Russell King (Oracle)
2026-01-30 11:00 ` [PATCH net-next 01/10] net: stmmac: rk: convert to mask-based interface mode configuration Russell King (Oracle)
2026-01-31 22:08 ` Jakub Kicinski
2026-01-31 23:27 ` Russell King (Oracle) [this message]
2026-02-01 0:44 ` Jakub Kicinski
2026-01-30 11:00 ` [PATCH net-next 02/10] net: stmmac: rk: convert rk3588 to mask-based interface mode config Russell King (Oracle)
2026-01-30 11:00 ` [PATCH net-next 03/10] net: stmmac: rk: move speed GRF register offset to private data Russell King (Oracle)
2026-01-30 11:00 ` [PATCH net-next 04/10] net: stmmac: rk: convert rk3588 to rk_set_reg_speed() Russell King (Oracle)
2026-01-30 11:00 ` [PATCH net-next 05/10] net: stmmac: rk: remove rk3528 RMII clock initialisation Russell King (Oracle)
2026-01-30 11:00 ` [PATCH net-next 06/10] net: stmmac: rk: use rk_encode_wm16() for RGMII clocks Russell King (Oracle)
2026-01-30 11:00 ` [PATCH net-next 07/10] net: stmmac: rk: use rk_encode_wm16() for RMII speed Russell King (Oracle)
2026-01-30 11:00 ` [PATCH net-next 08/10] net: stmmac: rk: use rk_encode_wm16() for RMII clock Russell King (Oracle)
2026-01-30 11:00 ` [PATCH net-next 09/10] net: stmmac: rk: remove need for ->set_speed() method Russell King (Oracle)
2026-01-30 11:01 ` [PATCH net-next 10/10] net: stmmac: rk: convert px30 Russell King (Oracle)
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=aX6P9D99Xi4PnI2J@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=alexandre.torgue@foss.st.com \
--cc=andrew+netdev@lunn.ch \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=heiko@sntech.de \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/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