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: <53AC6737.5010507@cogentembedded.com>
Date:	Thu, 26 Jun 2014 22:32:23 +0400
From:	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:	Peter De Schrijver <pdeschrijver@...dia.com>
CC:	Prashant Gaikwad <pgaikwad@...dia.com>,
	Mike Turquette <mturquette@...aro.org>,
	Stephen Warren <swarren@...dotorg.org>,
	linux-kernel@...r.kernel.org,
	Thierry Reding <thierry.reding@...il.com>,
	linux-tegra@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH] clk: tegra: export clock names for debugging

Hello.

On 06/26/2014 07:48 PM, Peter De Schrijver wrote:

> When writing a module for testing or debugging purposes, there is no way to
> get hold of clk handles. This patch solves this by exposing all valid clocks
> as clkdev's for the virtual device tegra-clk-debug.

> Signed-off-by: Peter De Schrijver <pdeschrijver@...dia.com>
> ---
>   drivers/clk/tegra/clk.c |    6 ++++++
>   1 files changed, 6 insertions(+), 0 deletions(-)

> diff --git a/drivers/clk/tegra/clk.c b/drivers/clk/tegra/clk.c
> index c0a7d77..3315fca 100644
> --- a/drivers/clk/tegra/clk.c
> +++ b/drivers/clk/tegra/clk.c
> @@ -277,6 +277,12 @@ void __init tegra_register_devclks(struct tegra_devclk *dev_clks, int num)
>   	for (i = 0; i < num; i++, dev_clks++)
>   		clk_register_clkdev(clks[dev_clks->dt_id], dev_clks->con_id,
>   				dev_clks->dev_id);
> +
> +	for (i = 0; i < clk_num; i++) {
> +		if (!IS_ERR(clks[i]) || !clks[i])

    Are you sure it should be || here, not &&? The following code doesn't seem 
to make much sense this way... Perhaps you meant !IS_ERR_OR_NULL(clks[i])?

> +			clk_register_clkdev(clks[i], __clk_get_name(clks[i]),
> +				"tegra-clk-debug");
> +	}
>   }

WBR, Sergei


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