Thread (7 messages) 7 messages, 5 authors, 2023-12-08

Re: [PATCH v5 17/39] net: cirrus: add DT support for Cirrus EP93xx

From: Nikita Shubin <nikita.shubin@maquefel.me>
Date: 2023-12-08 11:17:35
Also in: lkml

Hello Andy!

Thanks for review (i am counting all review not only this patch), only
this comment below raised a question:

On Wed, 2023-11-22 at 14:16 +0200, Andy Shevchenko wrote:
On Wed, Nov 22, 2023 at 11:59:55AM +0300, Nikita Shubin wrote:
quoted
- 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
...
quoted
 #include <linux/interrupt.h>
 #include <linux/moduleparam.h>
 #include <linux/platform_device.h>
+#include <linux/of.h>
Perhaps more ordering?
quoted
 #include <linux/delay.h>
 #include <linux/io.h>
 #include <linux/slab.h>
...
quoted
+       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?
of_property_read_u32 returns NULL on error.
quoted
+
+       dev = alloc_etherdev(sizeof(struct ep93xx_priv));
        if (dev == NULL) {
                err = -ENOMEM;
                goto err_out;
        }
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help