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: <be695493-c325-6d9a-8023-4f5ef5912b14@gmail.com>
Date:   Mon, 12 Mar 2018 10:17:04 -0700
From:   Florian Fainelli <f.fainelli@...il.com>
To:     Brad Mouring <brad.mouring@...com>,
        Nicolas Ferre <nicolas.ferre@...rochip.com>,
        Rob Herring <robh+dt@...nel.org>,
        "David S . Miller" <davem@...emloft.net>,
        Michael Grzeschik <m.grzeschik@...gutronix.de>,
        Andrew Lunn <andrew@...n.ch>
Cc:     Mark Rutland <mark.rutland@....com>, netdev@...r.kernel.org,
        Julia Cartwright <julia@...com>, devicetree@...r.kernel.org
Subject: Re: [PATCH v3 net-next 1/4] net: macb: Reorganize macb_mii bringup

On 03/12/2018 10:09 AM, Brad Mouring wrote:
> The macb mii setup (mii_probe() and mii_init()) previously was
> somewhat interspersed, likely a result of organic growth and hacking.
> 
> This change moves mii bus registration into mii_init and probing the
> bus for devices into mii_probe.
> 
> Signed-off-by: Brad Mouring <brad.mouring@...com>
> Suggested-by: Andrew Lunn <andrew@...n.ch>

Reviewed-by: Florian Fainelli <f.fainelli@...il.com>

> ---
>  drivers/net/ethernet/cadence/macb_main.c | 79 +++++++++++++++++---------------
>  1 file changed, 41 insertions(+), 38 deletions(-)
> 
> diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
> index e84afcf1ecb5..9b6195fbbf8e 100644
> --- a/drivers/net/ethernet/cadence/macb_main.c
> +++ b/drivers/net/ethernet/cadence/macb_main.c
> @@ -472,8 +472,42 @@ static int macb_mii_probe(struct net_device *dev)
>  	struct macb *bp = netdev_priv(dev);
>  	struct macb_platform_data *pdata;
>  	struct phy_device *phydev;
> -	int phy_irq;
> -	int ret;
> +	struct device_node *np;
> +	int phy_irq, ret, i;
> +
> +	pdata = dev_get_platdata(&bp->pdev->dev);
> +	np = bp->pdev->dev.of_node;
> +	ret = 0;
> +
> +	if (np) {

Nit: a future cleanup (not this patch series) should consider doing an
early check on np to reduce the indentation.
-- 
Florian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ