[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <347b59b4-3a42-6b1e-369b-641e50bd00d0@seco.com>
Date: Thu, 19 Jan 2023 18:25:30 -0500
From: Sean Anderson <sean.anderson@...o.com>
To: Geert Uytterhoeven <geert+renesas@...der.be>,
Madalin Bucur <madalin.bucur@....com>,
"David S . Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Horatiu Vultur <horatiu.vultur@...rochip.com>,
UNGLinuxDriver@...rochip.com,
Thierry Reding <thierry.reding@...il.com>,
Lorenzo Pieralisi <lpieralisi@...nel.org>,
Rob Herring <robh@...nel.org>,
Krzysztof WilczyĆski <kw@...ux.com>,
Bjorn Helgaas <bhelgaas@...gle.com>,
Jonathan Hunter <jonathanh@...dia.com>,
Vinod Koul <vkoul@...nel.org>,
Kishon Vijay Abraham I <kishon@...nel.org>,
Alan Stern <stern@...land.harvard.edu>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
Alim Akhtar <alim.akhtar@...sung.com>,
Siddharth Vadapalli <s-vadapalli@...com>,
Russell King <linux@...linux.org.uk>
Cc: netdev@...r.kernel.org, linux-tegra@...r.kernel.org,
linux-pci@...r.kernel.org, linux-phy@...ts.infradead.org,
linux-usb@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-samsung-soc@...r.kernel.org
Subject: Re: [PATCH 2/7] net: fman: memac: Convert to
devm_of_phy_optional_get()
On 1/18/23 05:15, Geert Uytterhoeven wrote:
> Use the new devm_of_phy_optional_get() helper instead of open-coding the
> same operation.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@...der.be>
> ---
> drivers/net/ethernet/freescale/fman/fman_memac.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/ethernet/freescale/fman/fman_memac.c b/drivers/net/ethernet/freescale/fman/fman_memac.c
> index 9349f841bd0645a0..892277f13048660d 100644
> --- a/drivers/net/ethernet/freescale/fman/fman_memac.c
> +++ b/drivers/net/ethernet/freescale/fman/fman_memac.c
> @@ -1152,12 +1152,12 @@ int memac_initialization(struct mac_device *mac_dev,
> else
> memac->sgmii_pcs = pcs;
>
> - memac->serdes = devm_of_phy_get(mac_dev->dev, mac_node, "serdes");
> - err = PTR_ERR(memac->serdes);
> - if (err == -ENODEV || err == -ENOSYS) {
> + memac->serdes = devm_of_phy_optional_get(mac_dev->dev, mac_node,
> + "serdes");
> + if (!memac->serdes) {
> dev_dbg(mac_dev->dev, "could not get (optional) serdes\n");
> - memac->serdes = NULL;
> } else if (IS_ERR(memac->serdes)) {
> + err = PTR_ERR(memac->serdes);
> dev_err_probe(mac_dev->dev, err, "could not get serdes\n");
> goto _return_fm_mac_free;
> }
Reviewed-by: Sean Anderson <sean.anderson@...o.com>
Powered by blists - more mailing lists