lkml.org 
[lkml]   [2023]   [Nov]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v5 17/39] net: cirrus: add DT support for Cirrus EP93xx
On Wed, Nov 22, 2023 at 11:59:55AM +0300, Nikita Shubin wrote:
> - 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

...

> #include <linux/interrupt.h>
> #include <linux/moduleparam.h>
> #include <linux/platform_device.h>
> +#include <linux/of.h>

Perhaps more ordering?

> #include <linux/delay.h>
> #include <linux/io.h>
> #include <linux/slab.h>

...

> + err = of_property_read_u32(np, "reg", &phy_id);
> + of_node_put(np);
> + if (err)
> + return dev_err_probe(&pdev->dev, -ENOENT, "Failed to locate \"phy_id\"\n");

Why shadowing the actual error code?

> +
> + dev = alloc_etherdev(sizeof(struct ep93xx_priv));
> if (dev == NULL) {
> err = -ENOMEM;
> goto err_out;
> }

--
With Best Regards,
Andy Shevchenko


\
 
 \ /
  Last update: 2023-11-22 13:24    [W:0.293 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site