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: <yw1x1t8ri8dz.fsf@unicorn.mansr.com>
Date:	Fri, 05 Feb 2016 13:39:20 +0000
From:	Måns Rullgård <mans@...sr.com>
To:	Sebastian Frias <sf84@...oste.net>
Cc:	"David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
	LKML <linux-kernel@...r.kernel.org>, mason <slash.tmp@...e.fr>
Subject: Re: [PATCH] net: ethernet: support "fixed-link" DT node on nb8800 driver

Sebastian Frias <sf84@...oste.net> writes:

> Signed-off-by: Sebastian Frias <sf84@...oste.net>
> ---
>  drivers/net/ethernet/aurora/nb8800.c | 19 +++++++++++++++----
>  1 file changed, 15 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/ethernet/aurora/nb8800.c
> b/drivers/net/ethernet/aurora/nb8800.c
> index ecc4a33..1353fee 100644
> --- a/drivers/net/ethernet/aurora/nb8800.c
> +++ b/drivers/net/ethernet/aurora/nb8800.c
> @@ -1461,10 +1461,21 @@ static int nb8800_probe(struct platform_device
> *pdev)
>  	}
>
>  	priv->phy_node = of_parse_phandle(pdev->dev.of_node, "phy-handle", 0);
> -	if (!priv->phy_node) {
> -		dev_err(&pdev->dev, "no PHY specified\n");
> -		ret = -ENODEV;
> -		goto err_free_bus;
> +	if (!priv->phy_node)
> +	{
> +		if (of_phy_is_fixed_link(pdev->dev.of_node)) {
> +			ret = of_phy_register_fixed_link(pdev->dev.of_node);
> +			if (ret < 0) {
> +				dev_err(&pdev->dev, "broken fixed-link specification\n");

Line is longer than 80 chars.

> +				goto err_free_bus;
> +			}
> +			priv->phy_node = of_node_get(pdev->dev.of_node);
> +		}
> +		else {

Wrong brace placement.

> +			dev_err(&pdev->dev, "no PHY specified\n");
> +			ret = -ENODEV;
> +			goto err_free_bus;
> +		}
>  	}
>
>  	priv->mii_bus = bus;
> -- 
> 2.1.4
>

-- 
Måns Rullgård

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ