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, 9 Oct 2014 13:44:33 -0700
From:	Stephen Boyd <sboyd@...eaurora.org>
To:	Tomeu Vizoso <tomeu.vizoso@...labora.com>
Cc:	Mike Turquette <mturquette@...aro.org>,
	Javier Martinez Canillas <javier.martinez@...labora.co.uk>,
	Jiri Kosina <jkosina@...e.cz>,
	Ralf Baechle <ralf@...ux-mips.org>,
	Boris Brezillon <boris.brezillon@...e-electrons.com>,
	Emilio López <emilio@...pez.com.ar>,
	Maxime Ripard <maxime.ripard@...e-electrons.com>,
	Manuel Lauss <manuel.lauss@...il.com>,
	Alex Elder <elder@...aro.org>,
	Matt Porter <mporter@...aro.org>,
	Tim Kryger <tim.kryger@...aro.org>,
	Haojian Zhuang <haojian.zhuang@...aro.org>,
	Zhangfei Gao <zhangfei.gao@...aro.org>,
	Jaehoon Chung <jh80.chung@...sung.com>,
	linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-mips@...ux-mips.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH v3 6/8] clk: Change clk_ops->determine_rate to return a
 clk_hw as the best parent

On 10/09, Tomeu Vizoso wrote:
> @@ -946,6 +946,7 @@ unsigned long __clk_round_rate(struct clk *clk, unsigned long rate)
>  {
>  	unsigned long parent_rate = 0;
>  	struct clk *parent;
> +	struct clk_hw *parent_hw;
>  
>  	if (!clk)
>  		return 0;
> @@ -956,7 +957,7 @@ unsigned long __clk_round_rate(struct clk *clk, unsigned long rate)
>  
>  	if (clk->ops->determine_rate)
>  		return clk->ops->determine_rate(clk->hw, rate, &parent_rate,
> -						&parent);
> +						&parent_hw);

We should assign the value of parent_hw somewhere here so that
drivers don't need to if they want the current parent. This would
match the current behavior where parent is already assigned the
current parent.

>  	else if (clk->ops->round_rate)
>  		return clk->ops->round_rate(clk->hw, rate, &parent_rate);
>  	else if (clk->flags & CLK_SET_RATE_PARENT)
> @@ -1345,6 +1346,7 @@ static struct clk *clk_calc_new_rates(struct clk *clk, unsigned long rate)
>  {
>  	struct clk *top = clk;
>  	struct clk *old_parent, *parent;
> +	struct clk_hw *parent_hw;
>  	unsigned long best_parent_rate = 0;
>  	unsigned long new_rate;
>  	int p_index = 0;
> @@ -1362,7 +1364,8 @@ static struct clk *clk_calc_new_rates(struct clk *clk, unsigned long rate)
>  	if (clk->ops->determine_rate) {
>  		new_rate = clk->ops->determine_rate(clk->hw, rate,
>  						    &best_parent_rate,
> -						    &parent);
> +						    &parent_hw);
> +		parent = parent_hw->clk;

Same comment here.

>  	} else if (clk->ops->round_rate) {
>  		new_rate = clk->ops->round_rate(clk->hw, rate,
>  						&best_parent_rate);
> 

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
--
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