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] [day] [month] [year] [list]
Message-ID: <5579E7BD.8010908@opensource.altera.com>
Date:	Thu, 11 Jun 2015 14:55:41 -0500
From:	Dinh Nguyen <dinguyen@...nsource.altera.com>
To:	Maxime Ripard <maxime.ripard@...e-electrons.com>
CC:	<sboyd@...eaurora.org>, <mturquette@...aro.org>,
	<dinh.linux@...il.com>, <linux-clk@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>,
	Emilio López <emilio@...pez.com.ar>
Subject: Re: [PATCH 5/6] clk: sunxi: make use of of_clk_parent_fill helper
 function

On 06/11/2015 04:06 AM, Maxime Ripard wrote:
> Hi Dinh,
> 
> On Wed, Jun 10, 2015 at 04:49:24PM -0500, 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: Maxime Ripard <maxime.ripard@...e-electrons.com>
>> Cc: "Emilio López" <emilio@...pez.com.ar>
>> ---
>>  drivers/clk/sunxi/clk-a20-gmac.c    |  3 +--
>>  drivers/clk/sunxi/clk-factors.c     |  4 +---
>>  drivers/clk/sunxi/clk-sun6i-ar100.c |  3 +--
>>  drivers/clk/sunxi/clk-sunxi.c       | 10 ++--------
>>  4 files changed, 5 insertions(+), 15 deletions(-)
>>
>> diff --git a/drivers/clk/sunxi/clk-a20-gmac.c b/drivers/clk/sunxi/clk-a20-gmac.c
>> index 0dcf4f2..a432edd 100644
>> --- a/drivers/clk/sunxi/clk-a20-gmac.c
>> +++ b/drivers/clk/sunxi/clk-a20-gmac.c
>> @@ -80,8 +80,7 @@ static void __init sun7i_a20_gmac_clk_setup(struct device_node *node)
>>  		goto free_mux;
>>  
>>  	/* gmac clock requires exactly 2 parents */
>> -	parents[0] = of_clk_get_parent_name(node, 0);
>> -	parents[1] = of_clk_get_parent_name(node, 1);
>> +	of_clk_parent_fill(node, parents, 2);
>>  	if (!parents[0] || !parents[1])
> 
> Maybe this check can be changed to something like:
> 
> if (of_clk_parent_fill(node, parents, 2) != 2)
>    goto free_gate;
> 
> Would that make sense?
> 

Yes, that would work. Will edit for v2.

Thanks,
Dinh

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