lkml.org 
[lkml]   [2023]   [Jul]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 20/42] net: cirrus: add DT support for Cirrus EP93xx
On Thu, Jul 20, 2023 at 02:29:20PM +0300, Nikita Shubin via B4 Relay wrote:
> From: Nikita Shubin <nikita.shubin@maquefel.me>
>
> - add OF ID match table
> - get phy_id from the device tree, as part of mdio
> - copy_addr is now always used, as there is no SoC/board that aren't
> - dropped platform header

...

> + base_addr = ioremap(mem->start, resource_size(mem));
> + if (!base_addr)
> + return dev_err_probe(&pdev->dev, -EIO, "Failed to ioremap ethernet registers\n");
> +
> + np = of_parse_phandle(pdev->dev.of_node, "phy-handle", 0);

Isn't it something which is done in PHY core should do for you?
Maybe Andrew Lunn can comment on this.

> + if (!np)

Yeah, right, let's leak mapped IO address space...
And so on.

> + return dev_err_probe(&pdev->dev, -ENODEV, "Please provide \"phy-handle\"\n");

--
With Best Regards,
Andy Shevchenko


\
 
 \ /
  Last update: 2023-07-21 18:36    [W:0.022 / U:1.360 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site