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 2/7] net: add framework to support Ethernet PSE and PDs devices
Date: Tue, 27 Sep 2022 18:00:56 -0700 [thread overview]
Message-ID: <20220927180056.5e8e410c@kernel.org> (raw)
In-Reply-To: <20220926112500.990705-3-o.rempel@pengutronix.de>
On Mon, 26 Sep 2022 13:24:55 +0200 Oleksij Rempel wrote:
> +static inline int pse_controller_register(struct pse_controller_dev *pcdev)
> +{
> + return -ENOTSUPP;
> +}
> +
> +static inline void pse_controller_unregister(struct pse_controller_dev *pcdev)
> +{
> +}
> +
> +static inline int devm_pse_controller_register(struct device *dev,
> + struct pse_controller_dev *pcdev)
> +{
> + return -ENOTSUPP;
> +}
Presumably only PSE controller drivers would try to register themselves.
Such drivers should depend on the right config, and therefore we don't
need static inline stubs for the register/unregister API.
> +static inline struct pse_control *pse_control_get(struct device *dev)
> +{
> + return ERR_PTR(-ENOTSUPP);
> +}
> +
> +static inline struct pse_control *devm_pse_control_get( struct device *dev)
nit: extra space after (
> +{
> + return ERR_PTR(-ENOTSUPP);
> +}
These two I don't see any calls to outside drivers/net/pse-pd/pse_core.c
so they should go from the API until we get an in-tree caller.
> +static inline struct pse_control *of_pse_control_get(struct device_node *node)
> +{
> + return ERR_PTR(-ENOTSUPP);
> +}
This one should prolly return -ENOENT as noted on patch 4.
If you could sed -i 's/ENOTSUPP/EOPNOTSUPP/' on the patches that'd be
great, I don't think those errno can leak to user space but why risk
it...
next prev parent reply other threads:[~2022-09-28 1:01 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 [this message]
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
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=20220927180056.5e8e410c@kernel.org \
--to=kuba@kernel$(echo .)org \
--cc=andrew@lunn$(echo .)ch \
--cc=corbet@lwn$(echo .)net \
--cc=davem@davemloft$(echo .)net \
--cc=david@protonic$(echo .)nl \
--cc=devicetree@vger$(echo .)kernel.org \
--cc=edumazet@google$(echo .)com \
--cc=hkallweit1@gmail$(echo .)com \
--cc=kernel@pengutronix$(echo .)de \
--cc=krzysztof.kozlowski+dt@linaro$(echo .)org \
--cc=linux-doc@vger$(echo .)kernel.org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux@armlinux$(echo .)org.uk \
--cc=luka.perkov@sartura$(echo .)hr \
--cc=netdev@vger$(echo .)kernel.org \
--cc=o.rempel@pengutronix$(echo .)de \
--cc=pabeni@redhat$(echo .)com \
--cc=robert.marko@sartura$(echo .)hr \
--cc=robh+dt@kernel$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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