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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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;
> +}




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux