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, 6 Sep 2018 18:12:09 +0900
From:   Stafford Horne <shorne@...il.com>
To:     Rob Herring <robh@...nel.org>
Cc:     devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
        Jonas Bonn <jonas@...thpole.se>,
        Stefan Kristiansson <stefan.kristiansson@...nalahti.fi>,
        openrisc@...ts.librecores.org
Subject: Re: [PATCH 10/21] openrisc: use for_each_of_cpu_node iterator

On Wed, Sep 05, 2018 at 02:37:27PM -0500, Rob Herring wrote:
> Use the for_each_of_cpu_node iterator to iterate over cpu nodes. This
> has the side effect of defaulting to iterating using "cpu" node names in
> preference to the deprecated (for FDT) device_type == "cpu".
> 
> This also fixes a leaked reference for cpus node.
> 
> Cc: Jonas Bonn <jonas@...thpole.se>
> Cc: Stefan Kristiansson <stefan.kristiansson@...nalahti.fi>
> Cc: Stafford Horne <shorne@...il.com>
> Cc: openrisc@...ts.librecores.org
> Signed-off-by: Rob Herring <robh@...nel.org>
> ---
> Please ack and I will take via the DT tree. This is dependent on the
> first 2 patches.
> 
>  arch/openrisc/kernel/setup.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/arch/openrisc/kernel/setup.c b/arch/openrisc/kernel/setup.c
> index 9d28ab14d139..e17fcd83120f 100644
> --- a/arch/openrisc/kernel/setup.c
> +++ b/arch/openrisc/kernel/setup.c
> @@ -158,9 +158,8 @@ static struct device_node *setup_find_cpu_node(int cpu)
>  {
>  	u32 hwid;
>  	struct device_node *cpun;
> -	struct device_node *cpus = of_find_node_by_path("/cpus");
> 
> -	for_each_available_child_of_node(cpus, cpun) {
> +	for_each_of_cpu_node(cpun) {
>  		if (of_property_read_u32(cpun, "reg", &hwid))
>  			continue;
>  		if (hwid == cpu)

This looks fine to me.  Thanks Rob

Acked-by: Stafford Horne <shorne@...il.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ