lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <08d8b47f8acc1fc51da2eee7eab3a55f0f678907.camel@microchip.com>
Date:   Fri, 20 Jan 2023 09:46:05 +0100
From:   Steen Hegelund <steen.hegelund@...rochip.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 3/7] net: lan966x: Convert to devm_of_phy_optional_get()

Hi Geert,

This looks good to me.

BR
Steen

Reviewed-by: Steen Hegelund <Steen.Hegelund@...rochip.com>

On Wed, 2023-01-18 at 11:15 +0100, Geert Uytterhoeven wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the
> content is safe
> 
> 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/microchip/lan966x/lan966x_main.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/ethernet/microchip/lan966x/lan966x_main.c
> b/drivers/net/ethernet/microchip/lan966x/lan966x_main.c
> index cadde20505ba0689..d64a525cdc9ea18b 100644
> --- a/drivers/net/ethernet/microchip/lan966x/lan966x_main.c
> +++ b/drivers/net/ethernet/microchip/lan966x/lan966x_main.c
> @@ -1147,9 +1147,8 @@ static int lan966x_probe(struct platform_device *pdev)
>                 lan966x->ports[p]->config.portmode = phy_mode;
>                 lan966x->ports[p]->fwnode = fwnode_handle_get(portnp);
> 
> -               serdes = devm_of_phy_get(lan966x->dev, to_of_node(portnp),
> NULL);
> -               if (PTR_ERR(serdes) == -ENODEV)
> -                       serdes = NULL;
> +               serdes = devm_of_phy_optional_get(lan966x->dev,
> +                                                 to_of_node(portnp), NULL);
>                 if (IS_ERR(serdes)) {
>                         err = PTR_ERR(serdes);
>                         goto cleanup_ports;
> --
> 2.34.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ