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]
Date:	Thu, 05 Feb 2015 11:41:43 -0800
From:	Florian Fainelli <f.fainelli@...il.com>
To:	Tobias Waldekranz <tobias@...dekranz.com>, netdev@...r.kernel.org
Subject: Re: [PATCH] dsa: correctly determine the number of switches in a
 system

On 05/02/15 05:54, Tobias Waldekranz wrote:
> The number of connected switches was sourced from the number of
> children to the DSA node, change it to the number of available
> children, skipping any disabled switches.
> 
> Signed-off-by: Tobias Waldekranz <tobias@...dekranz.com>

Acked-by: Florian Fainelli <f.fainelli@...il.com>
Fixes: 5e95329b701c4 ("dsa: add device tree bindings to register DSA
switches")

> ---
>  net/dsa/dsa.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c
> index 3731714..2173402 100644
> --- a/net/dsa/dsa.c
> +++ b/net/dsa/dsa.c
> @@ -603,7 +603,7 @@ static int dsa_of_probe(struct platform_device *pdev)
>  
>  	pdev->dev.platform_data = pd;
>  	pd->netdev = &ethernet_dev->dev;
> -	pd->nr_chips = of_get_child_count(np);
> +	pd->nr_chips = of_get_available_child_count(np);
>  	if (pd->nr_chips > DSA_MAX_SWITCHES)
>  		pd->nr_chips = DSA_MAX_SWITCHES;
>  
> 


-- 
Florian
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ