Thread (11 messages) 11 messages, 2 authors, 2022-09-28

Re: [PATCH net-next v7 4/7] net: mdiobus: search for PSE nodes by parsing PHY nodes.

From: Jakub Kicinski <kuba@kernel.org>
Date: 2022-09-28 00:56:03
Also in: linux-devicetree, linux-doc, lkml

On Mon, 26 Sep 2022 13:24:57 +0200 Oleksij Rempel wrote:
+static struct pse_control *
+fwnode_find_pse_control(struct fwnode_handle *fwnode)
+{
+	struct pse_control *psec;
+	struct device_node *np;
+
+	np = to_of_node(fwnode);
+	if (!np)
+		return NULL;
+
+	psec = of_pse_control_get(np);
This will fail with ENOTSUPP if PSE is not built. Won't that make all
fwnode_mdiobus_register_phy() calls fail?

static inline struct pse_control *of_pse_control_get(struct device_node *node)
{
	return ERR_PTR(-ENOTSUPP);
}

Actually let me take a closer look at patch 2 :S
+	if (PTR_ERR(psec) == -ENOENT)
+		return NULL;
+
+	return psec;
+}
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help