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:	Mon, 11 Apr 2016 16:10:12 +0530
From:	Sekhar Nori <nsekhar@...com>
To:	David Lechner <david@...hnology.com>
CC:	<petr@...ix.com>, <sergei.shtylyov@...entembedded.com>,
	<David.Laight@...LAB.COM>, Rob Herring <robh+dt@...nel.org>,
	Pawel Moll <pawel.moll@....com>,
	Mark Rutland <mark.rutland@....com>,
	Ian Campbell <ijc+devicetree@...lion.org.uk>,
	Kumar Gala <galak@...eaurora.org>,
	Russell King <linux@....linux.org.uk>,
	Kevin Hilman <khilman@...nel.org>,
	Kishon Vijay Abraham I <kishon@...com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Alan Stern <stern@...land.harvard.edu>, Bin Liu <b-liu@...com>,
	Lee Jones <lee.jones@...aro.org>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" 
	<devicetree@...r.kernel.org>,
	open list <linux-kernel@...r.kernel.org>,
	"moderated list:ARM PORT" <linux-arm-kernel@...ts.infradead.org>,
	"open list:USB SUBSYSTEM" <linux-usb@...r.kernel.org>
Subject: Re: [PATCH v3 05/16] ARM: davinci: add set_parent callback for mux
 clocks

On Friday 25 March 2016 05:21 AM, David Lechner wrote:
> Introduce a set_parent callback that will be used for mux clocks, such as
> the USB PHY muxes and the async3 clock domain mux.
> 
> Signed-off-by: David Lechner <david@...hnology.com>
> ---
> 
> v3 changes: none.
> 
> 
>  arch/arm/mach-davinci/clock.c | 17 ++++++++++++++++-
>  arch/arm/mach-davinci/clock.h |  1 +
>  2 files changed, 17 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/mach-davinci/clock.c b/arch/arm/mach-davinci/clock.c
> index a5c2629..dfc2eb3 100644
> --- a/arch/arm/mach-davinci/clock.c
> +++ b/arch/arm/mach-davinci/clock.c
> @@ -195,6 +195,13 @@ int clk_set_parent(struct clk *clk, struct clk *parent)
>  		return -EINVAL;
>  
>  	mutex_lock(&clocks_mutex);
> +	if (clk->set_parent) {
> +		int ret = clk->set_parent(clk, parent);

Need empty line here.

> +		if (ret) {
> +			mutex_unlock(&clocks_mutex);
> +			return ret;
> +		}
> +	}
>  	clk->parent = parent;
>  	list_del_init(&clk->childnode);
>  	list_add(&clk->childnode, &clk->parent->children);
> @@ -224,8 +231,16 @@ int clk_register(struct clk *clk)
>  
>  	mutex_lock(&clocks_mutex);
>  	list_add_tail(&clk->node, &clocks);
> -	if (clk->parent)
> +	if (clk->parent) {
> +		if (clk->set_parent) {
> +			int ret = clk->set_parent(clk, clk->parent);

Here too. Applying this patch with these local changes.

BTW, checkpatch complained about these. Please try to address all
warnings unless there is a good reason not to fix one.

Thanks,
Sekhar

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ