lkml.org 
[lkml]   [2023]   [Dec]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 3/5] net: mdio: ipq4019: configure CMN PLL clock for ipq5332
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!

\
 
 \ /
  Last update: 2023-12-12 20:14    [W:0.072 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site