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:	Fri, 06 Feb 2015 12:43:05 +0100
From:	Tomeu Vizoso <tomeu.vizoso@...labora.com>
To:	Stephen Boyd <sboyd@...eaurora.org>,
	Mike Turquette <mturquette@...aro.org>
CC:	linux-kernel@...r.kernel.org,
	Sylwester Nawrocki <s.nawrocki@...sung.com>
Subject: Re: [PATCH 3/3] clk: Replace of_clk_get_by_clkspec() with of_clk_get_from_provider()

On 02/06/2015 01:19 AM, Stephen Boyd wrote:
> of_clk_get_by_clkspec() has the same function signature as
> of_clk_get_from_provider()
> 
>  struct clk *of_clk_get_by_clkspec(struct of_phandle_args
>  *clkspec)
>  struct clk *of_clk_get_from_provider(struct of_phandle_args
>  *clkspec)
> 
> except of_clk_get_by_clkspec() checks to make sure clkspec is not
> NULL. Let's remove of_clk_get_by_clkspec() and replace the
> callers of it (clkconf.c) with of_clk_get_from_provider().
> 
> Cc: Sylwester Nawrocki <s.nawrocki@...sung.com>
> Signed-off-by: Stephen Boyd <sboyd@...eaurora.org>
> ---
>  drivers/clk/clk-conf.c |  6 +++---
>  drivers/clk/clk.c      | 31 ++++++++++++++-----------------
>  drivers/clk/clk.h      |  3 ---
>  drivers/clk/clkdev.c   | 30 +-----------------------------
>  4 files changed, 18 insertions(+), 52 deletions(-)
> 
> diff --git a/drivers/clk/clk-conf.c b/drivers/clk/clk-conf.c
> index aad4796aa3ed..6a681a2c4c89 100644
> --- a/drivers/clk/clk-conf.c
> +++ b/drivers/clk/clk-conf.c
> @@ -39,7 +39,7 @@ static int __set_clk_parents(struct device_node *node, bool clk_supplier)
>  		}
>  		if (clkspec.np == node && !clk_supplier)
>  			return 0;
> -		pclk = of_clk_get_by_clkspec(&clkspec);
> +		pclk = of_clk_get_from_provider(&clkspec);
>  		if (IS_ERR(pclk)) {
>  			pr_warn("clk: couldn't get parent clock %d for %s\n",
>  				index, node->full_name);
> @@ -54,7 +54,7 @@ static int __set_clk_parents(struct device_node *node, bool clk_supplier)
>  			rc = 0;
>  			goto err;
>  		}
> -		clk = of_clk_get_by_clkspec(&clkspec);
> +		clk = of_clk_get_from_provider(&clkspec);
>  		if (IS_ERR(clk)) {
>  			pr_warn("clk: couldn't get parent clock %d for %s\n",
>  				index, node->full_name);
> @@ -98,7 +98,7 @@ static int __set_clk_rates(struct device_node *node, bool clk_supplier)
>  			if (clkspec.np == node && !clk_supplier)
>  				return 0;
>  
> -			clk = of_clk_get_by_clkspec(&clkspec);
> +			clk = of_clk_get_from_provider(&clkspec);
>  			if (IS_ERR(clk)) {
>  				pr_warn("clk: couldn't get clock %d for %s\n",
>  					index, node->full_name);
> diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
> index 315dc22b7356..5d804a43ab1a 100644
> --- a/drivers/clk/clk.c
> +++ b/drivers/clk/clk.c
> @@ -2807,16 +2807,6 @@ static LIST_HEAD(of_clk_providers);
>  static DEFINE_MUTEX(of_clk_mutex);
>  
>  /* of_clk_provider list locking helpers */

Patch looks good to me, but this comment can be removed now.

Reviewed-by: Tomeu Vizoso <tomeu.vizoso@...labora.com>

Thanks,

Tomeu
--
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