From: Vinod Koul <vkoul@kernel.org>
To: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: "Jonathan Corbet" <corbet@lwn.net>,
"Madalin Bucur" <madalin.bucur@nxp.com>,
"David S . Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"Horatiu Vultur" <horatiu.vultur@microchip.com>,
UNGLinuxDriver@microchip.com,
"Thierry Reding" <thierry.reding@gmail.com>,
"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Wilczyński" <kw@linux.com>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Jonathan Hunter" <jonathanh@nvidia.com>,
"Kishon Vijay Abraham I" <kishon@kernel.org>,
"Alan Stern" <stern@rowland.harvard.edu>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Krzysztof Kozlowski" <krzysztof.kozlowski@linaro.org>,
"Alim Akhtar" <alim.akhtar@samsung.com>,
"Siddharth Vadapalli" <s-vadapalli@ti.com>,
"Russell King" <linux@armlinux.org.uk>,
linux-phy@lists.infradead.org, linux-doc@vger.kernel.org,
netdev@vger.kernel.org, linux-tegra@vger.kernel.org,
linux-pci@vger.kernel.org, linux-usb@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org
Subject: Re: [PATCH treewide v2 0/9] phy: Add devm_of_phy_optional_get() helper
Date: Fri, 3 Feb 2023 15:28:57 +0530 [thread overview]
Message-ID: <Y9za4a8qyapi4CWD@matsya> (raw)
In-Reply-To: <cover.1674584626.git.geert+renesas@glider.be>
On 24-01-23, 19:37, Geert Uytterhoeven wrote:
> Hi Vinod et al,
>
> While there exist several optional_get() PHY helper functions, there is
> no optional variant of devm_of_phy_get(), leading to several drivers
> implementing this theirselves, sometimes in buggy ways.
>
> Hence this series, after two cleanup patches, introduces a
> devm_of_phy_optional_get() helper(), and converts existing users of
> devm_of_phy_get() where appropriate.
Applied and pushed to tag phy-devm_of_phy_optional_get
The following changes since commit 1b929c02afd37871d5afb9d498426f83432e71c2:
Linux 6.2-rc1 (2022-12-25 13:41:39 -0800)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy.git tags/phy-devm_of_phy_optional_get
for you to fetch changes up to 41a435e30eb007ca2c8f71db734af6ec3509af4d:
usb: host: ohci-exynos: Convert to devm_of_phy_optional_get() (2023-02-03 11:19:35 +0530)
----------------------------------------------------------------
Phy tag for new devm_of_phy_optional_get() API
----------------------------------------------------------------
Geert Uytterhoeven (8):
phy: Remove unused phy_optional_get()
doc: phy: Document devm_of_phy_get()
phy: Add devm_of_phy_optional_get() helper
net: fman: memac: Convert to devm_of_phy_optional_get()
net: lan966x: Convert to devm_of_phy_optional_get()
PCI: tegra: Convert to devm_of_phy_optional_get()
usb: host: ehci-exynos: Convert to devm_of_phy_optional_get()
usb: host: ohci-exynos: Convert to devm_of_phy_optional_get()
Documentation/driver-api/phy/phy.rst | 24 ++++++++++++++----------
drivers/net/ethernet/freescale/fman/fman_memac.c | 9 ++++-----
drivers/net/ethernet/microchip/lan966x/lan966x_main.c | 5 ++---
drivers/pci/controller/pci-tegra.c | 5 +----
drivers/phy/phy-core.c | 51 ++++++++++++++++++++++++++++++---------------------
drivers/usb/host/ehci-exynos.c | 23 ++++++-----------------
drivers/usb/host/ohci-exynos.c | 23 ++++++-----------------
include/linux/phy/phy.h | 16 +++++++++-------
8 files changed, 72 insertions(+), 84 deletions(-)
> Thanks!
>
> > > --- a/drivers/net/ethernet/ti/am65-cpsw-nuss.c
> > > +++ b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
> > > @@ -1460,11 +1460,9 @@ static int am65_cpsw_init_serdes_phy(struct device *dev, struct device_node *por
> > > struct phy *phy;
> > > int ret;
> > >
> > > - phy = devm_of_phy_get(dev, port_np, name);
> > > - if (PTR_ERR(phy) == -ENODEV)
> > > - return 0;
> > > - if (IS_ERR(phy))
> > > - return PTR_ERR(phy);
> > > + phy = devm_of_phy_optional_get(dev, port_np, name);
> > > + if (IS_ERR_OR_NULL(phy))
> > > + return PTR_ERR_OR_ZERO(phy);
> > >
> > > /* Serdes PHY exists. Store it. */
> > > port->slave.serdes_phy = phy;
>
> Gr{oetje,eeting}s,
>
> Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
>
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
> -- Linus Torvalds
>
> Changes compared to v1[1]:
> - Incorporate "[PATCH v2 1/9] phy: Remove unused phy_optional_get()",
> as it touches the same documentation,
> - New patch "[PATCH v2 2/9] doc: phy: Document devm_of_phy_get()",
> - Print an error message in case of failure, as requested by RobH,
> - Update Documentation,
> - Clarify removed checks for -ENODEV and -ENOSYS,
> - Remove error printing in case of real failures from callers,
> - Rebase am65-cpsw change on top of commit 854617f52ab42418 ("net:
> ethernet: ti: am65-cpsw: Handle -EPROBE_DEFER for Serdes PHY") in
> net-next (next-20230123 and later),
> - Add Reviewed-by, Acked-by.
>
> Most of this series been compile-tested only, but the new helper itself
> has been tested with a new user[2].
>
> Thanks for your comments!
>
> [1] "[PATCH treewide 0/7] phy: Add devm_of_phy_optional_get() helper"
> https://lore.kernel.org/r/cover.1674036164.git.geert+renesas@glider.be
> [2] "[PATCH 12/12] can: rcar_canfd: Add transceiver support"
> https://lore.kernel.org/r/e825b50a843ffe40e33f34e4d858c07c1b2ff259.1674499048.git.geert+renesas@glider.be
>
> Geert Uytterhoeven (9):
> phy: Remove unused phy_optional_get()
> doc: phy: Document devm_of_phy_get()
> phy: Add devm_of_phy_optional_get() helper
> net: fman: memac: Convert to devm_of_phy_optional_get()
> net: lan966x: Convert to devm_of_phy_optional_get()
> net: ethernet: ti: am65-cpsw: Convert to devm_of_phy_optional_get()
> PCI: tegra: Convert to devm_of_phy_optional_get()
> usb: host: ehci-exynos: Convert to devm_of_phy_optional_get()
> usb: host: ohci-exynos: Convert to devm_of_phy_optional_get()
>
> Documentation/driver-api/phy/phy.rst | 24 +++++----
> .../net/ethernet/freescale/fman/fman_memac.c | 9 ++--
> .../ethernet/microchip/lan966x/lan966x_main.c | 5 +-
> drivers/net/ethernet/ti/am65-cpsw-nuss.c | 8 ++-
> drivers/pci/controller/pci-tegra.c | 5 +-
> drivers/phy/phy-core.c | 51 +++++++++++--------
> drivers/usb/host/ehci-exynos.c | 23 +++------
> drivers/usb/host/ohci-exynos.c | 23 +++------
> include/linux/phy/phy.h | 16 +++---
> 9 files changed, 75 insertions(+), 89 deletions(-)
>
> --
> 2.34.1
>
> Gr{oetje,eeting}s,
>
> Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
>
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
> -- Linus Torvalds
--
~Vinod
prev parent reply other threads:[~2023-02-03 9:59 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-24 18:37 [PATCH treewide v2 0/9] phy: Add devm_of_phy_optional_get() helper Geert Uytterhoeven
2023-01-24 18:37 ` [PATCH v2 1/9] phy: Remove unused phy_optional_get() Geert Uytterhoeven
2023-01-24 18:37 ` [PATCH v2 2/9] doc: phy: Document devm_of_phy_get() Geert Uytterhoeven
2023-01-24 18:37 ` [PATCH v2 3/9] phy: Add devm_of_phy_optional_get() helper Geert Uytterhoeven
2023-01-24 18:37 ` [PATCH v2 4/9] net: fman: memac: Convert to devm_of_phy_optional_get() Geert Uytterhoeven
2023-01-24 18:37 ` [PATCH v2 5/9] net: lan966x: " Geert Uytterhoeven
2023-01-24 18:37 ` [PATCH v2 6/9] net: ethernet: ti: am65-cpsw: " Geert Uytterhoeven
2023-01-25 5:13 ` Siddharth Vadapalli
2023-02-03 5:27 ` Vinod Koul
2023-02-03 8:04 ` Geert Uytterhoeven
2023-02-03 9:58 ` Vinod Koul
2023-01-24 18:37 ` [PATCH v2 7/9] PCI: tegra: " Geert Uytterhoeven
2023-01-24 18:37 ` [PATCH v2 8/9] usb: host: ehci-exynos: " Geert Uytterhoeven
2023-01-25 14:38 ` Greg Kroah-Hartman
2023-01-24 18:37 ` [PATCH v2 9/9] usb: host: ohci-exynos: " Geert Uytterhoeven
2023-01-25 14:38 ` Greg Kroah-Hartman
2023-02-02 14:57 ` [PATCH treewide v2 0/9] phy: Add devm_of_phy_optional_get() helper Geert Uytterhoeven
2023-02-03 9:58 ` Vinod Koul [this message]
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=Y9za4a8qyapi4CWD@matsya \
--to=vkoul@kernel.org \
--cc=UNGLinuxDriver@microchip.com \
--cc=alim.akhtar@samsung.com \
--cc=bhelgaas@google.com \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=geert+renesas@glider.be \
--cc=gregkh@linuxfoundation.org \
--cc=horatiu.vultur@microchip.com \
--cc=jonathanh@nvidia.com \
--cc=kishon@kernel.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=kuba@kernel.org \
--cc=kw@linux.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=lpieralisi@kernel.org \
--cc=madalin.bucur@nxp.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=robh@kernel.org \
--cc=s-vadapalli@ti.com \
--cc=stern@rowland.harvard.edu \
--cc=thierry.reding@gmail.com \
/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).