devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Oleksij Rempel <o.rempel@pengutronix.de>
Cc: Andrew Lunn <andrew@lunn.ch>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>,
	Russell King <linux@armlinux.org.uk>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Jonathan Corbet <corbet@lwn.net>,
	kernel@pengutronix.de, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org, devicetree@vger.kernel.org,
	linux-doc@vger.kernel.org, David Jander <david@protonic.nl>,
	Luka Perkov <luka.perkov@sartura.hr>,
	Robert Marko <robert.marko@sartura.hr>
Subject: Re: [PATCH net-next v7 4/7] net: mdiobus: search for PSE nodes by parsing PHY nodes.
Date: Tue, 27 Sep 2022 17:55:48 -0700	[thread overview]
Message-ID: <20220927175548.331d9bae@kernel.org> (raw)
In-Reply-To: <20220926112500.990705-5-o.rempel@pengutronix.de>

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


  reply	other threads:[~2022-09-28  0:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-26 11:24 [PATCH net-next v7 0/7] add generic PSE support Oleksij Rempel
2022-09-26 11:24 ` [PATCH net-next v7 1/7] dt-bindings: net: phy: add PoDL PSE property Oleksij Rempel
2022-09-26 11:24 ` [PATCH net-next v7 2/7] net: add framework to support Ethernet PSE and PDs devices Oleksij Rempel
2022-09-28  1:00   ` Jakub Kicinski
2022-09-26 11:24 ` [PATCH net-next v7 3/7] net: mdiobus: fwnode_mdiobus_register_phy() rework error handling Oleksij Rempel
2022-09-26 11:24 ` [PATCH net-next v7 4/7] net: mdiobus: search for PSE nodes by parsing PHY nodes Oleksij Rempel
2022-09-28  0:55   ` Jakub Kicinski [this message]
2022-09-26 11:24 ` [PATCH net-next v7 5/7] ethtool: add interface to interact with Ethernet Power Equipment Oleksij Rempel
2022-09-28  1:02   ` Jakub Kicinski
2022-09-26 11:24 ` [PATCH net-next v7 6/7] dt-bindings: net: pse-dt: add bindings for regulator based PoDL PSE controller Oleksij Rempel
2022-09-26 11:25 ` [PATCH net-next v7 7/7] net: pse-pd: add regulator based PSE driver Oleksij Rempel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220927175548.331d9bae@kernel.org \
    --to=kuba@kernel.org \
    --cc=andrew@lunn.ch \
    --cc=corbet@lwn.net \
    --cc=davem@davemloft.net \
    --cc=david@protonic.nl \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=luka.perkov@sartura.hr \
    --cc=netdev@vger.kernel.org \
    --cc=o.rempel@pengutronix.de \
    --cc=pabeni@redhat.com \
    --cc=robert.marko@sartura.hr \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).