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: <55793ABB.5050302@st.com>
Date:	Thu, 11 Jun 2015 09:37:31 +0200
From:	Gabriel Fernandez <gabriel.fernandez@...com>
To:	<dinguyen@...nsource.altera.com>, <sboyd@...eaurora.org>,
	<mturquette@...aro.org>
CC:	<dinh.linux@...il.com>, <linux-clk@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>,
	Peter Griffin <peter.griffin@...aro.org>
Subject: Re: [PATCH 4/6] clk: st: make use of of_clk_parent_fill helper function

Hi

Tested-by Gabriel Fernandez <gabriel.fernandez@...com>

Best Regards.

On 06/10/2015 11:49 PM, dinguyen@...nsource.altera.com wrote:
> From: Dinh Nguyen <dinguyen@...nsource.altera.com>
>
> Use of_clk_parent_fill to fill in the parent clock names' array.
>
> Signed-off-by: Dinh Nguyen <dinguyen@...nsource.altera.com>
> Cc: Peter Griffin <peter.griffin@...aro.org>
> Cc: Gabriel FERNANDEZ <gabriel.fernandez@...com>
> ---
>   drivers/clk/st/clk-flexgen.c | 6 ++----
>   drivers/clk/st/clkgen-mux.c  | 7 ++-----
>   2 files changed, 4 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/clk/st/clk-flexgen.c b/drivers/clk/st/clk-flexgen.c
> index 657ca14..ed0696c 100644
> --- a/drivers/clk/st/clk-flexgen.c
> +++ b/drivers/clk/st/clk-flexgen.c
> @@ -243,7 +243,7 @@ static const char ** __init flexgen_get_parents(struct device_node *np,
>   						       int *num_parents)
>   {
>   	const char **parents;
> -	int nparents, i;
> +	int nparents;
>   
>   	nparents = of_clk_get_parent_count(np);
>   	if (WARN_ON(nparents <= 0))
> @@ -253,10 +253,8 @@ static const char ** __init flexgen_get_parents(struct device_node *np,
>   	if (!parents)
>   		return NULL;
>   
> -	for (i = 0; i < nparents; i++)
> -		parents[i] = of_clk_get_parent_name(np, i);
> +	*num_parents = of_clk_parent_fill(np, parents, nparents);
>   
> -	*num_parents = nparents;
>   	return parents;
>   }
>   
> diff --git a/drivers/clk/st/clkgen-mux.c b/drivers/clk/st/clkgen-mux.c
> index 4fbe6e0..b83654a 100644
> --- a/drivers/clk/st/clkgen-mux.c
> +++ b/drivers/clk/st/clkgen-mux.c
> @@ -24,7 +24,7 @@ static const char ** __init clkgen_mux_get_parents(struct device_node *np,
>   						       int *num_parents)
>   {
>   	const char **parents;
> -	int nparents, i;
> +	int nparents;
>   
>   	nparents = of_clk_get_parent_count(np);
>   	if (WARN_ON(nparents <= 0))
> @@ -34,10 +34,7 @@ static const char ** __init clkgen_mux_get_parents(struct device_node *np,
>   	if (!parents)
>   		return ERR_PTR(-ENOMEM);
>   
> -	for (i = 0; i < nparents; i++)
> -		parents[i] = of_clk_get_parent_name(np, i);
> -
> -	*num_parents = nparents;
> +	*num_parents = of_clk_parent_fill(np, parents, nparents);
>   	return parents;
>   }
>   

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ