Re: [PATCH v2 3/5] net: mdio: ipq4019: configure CMN PLL clock for ipq5332

Russell King (Oracle)
2023-12-12T19:13:03Z

On Tue, Dec 12, 2023 at 01:54:17PM +0100, Maxime Chevallier wrote:
> Hello,
>
> I have some more minor comments for yoi :)
>
> On Tue, 12 Dec 2023 19:51:48 +0800
> Luo Jie <quic_luoj@quicinc.com> wrote:
> > + /* The CMN block resource is for providing clock source to ethernet,
> > + * which can be optionally configured on the platform ipq9574 and
> > + * ipq5332.
> > + */
> > + res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "cmn_blk");
> > + if (res) {
> > + priv->cmn_membase = devm_ioremap_resource(&pdev->dev, res);
> > + if (IS_ERR(priv->cmn_membase))
> > + return PTR_ERR(priv->cmn_membase);
> > + }
> > +
>
> And here you can simplify a bit by using
> devm_platform_ioremap_resource_byname()

Not if the resource is optional.

--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!