public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Stephen Warren <swarren@wwwdotorg.org>
To: Peter De Schrijver <pdeschrijver@nvidia.com>
Cc: linux-tegra@vger.kernel.org,
	Mike Turquette <mturquette@linaro.org>,
	Joseph Lo <josephl@nvidia.com>,
	Paul Walmsley <pwalmsley@nvidia.com>,
	Prashant Gaikwad <pgaikwad@nvidia.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/4] clk: tegra: convert Tegra114 gate clocks to table
Date: Tue, 03 Sep 2013 12:10:49 -0600	[thread overview]
Message-ID: <52262629.8010605@wwwdotorg.org> (raw)
In-Reply-To: <1378215105-12145-3-git-send-email-pdeschrijver@nvidia.com>

On 09/03/2013 07:31 AM, Peter De Schrijver wrote:
> This patch converts the Tegra114 gate clock registration to be table driven
> like the periph clocks. The same struct tegra_periph_init_data is used for the
> table, but some fields are unused. This makes the code easier to read and also
> paves the way to share clock data between Tegra SoCs.

> diff --git a/drivers/clk/tegra/clk-tegra114.c b/drivers/clk/tegra/clk-tegra114.c

> +static const char *clk_32k[] = {
> +	"clk_32k",
> +};


I think those new arrays of strings are only used ...

> @@ -2114,6 +2023,26 @@ static __init void tegra114_periph_clk_init(void __iomem *clk_base)

> +	for (i = 0; i < ARRAY_SIZE(tegra_periph_gate_clk_list); i++) {
> +		int reg_bank;
> +
> +		data = &tegra_periph_gate_clk_list[i];
> +		reg_bank = get_reg_bank(data->periph.gate.clk_num);
> +
> +		if (reg_bank >= 0) {
> +			clk = tegra_clk_register_periph_gate(data->name,
> +					data->parent_names[0],

... here. If so, why make them arrays? Surely they could just be a const
char * inside tegra_periph_gate_clk_list[i]?

  reply	other threads:[~2013-09-03 18:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-03 13:31 [PATCH 0/4] Introduce table driven initializations Peter De Schrijver
2013-09-03 13:31 ` [PATCH 1/4] clk: tegra: simplify periph clock data Peter De Schrijver
2013-09-03 13:31 ` [PATCH 2/4] clk: tegra: convert Tegra114 gate clocks to table Peter De Schrijver
2013-09-03 18:10   ` Stephen Warren [this message]
2013-09-03 13:31 ` [PATCH 3/4] clk: tegra114: table driven audio clock init Peter De Schrijver
2013-09-03 13:31 ` [PATCH 4/4] clk: tegra114: table driven PMC " Peter De Schrijver
2013-09-04  0:54   ` Joseph Lo
2013-09-03 13:34 ` [PATCH 0/4] Introduce table driven initializations Peter De Schrijver
2013-09-03 18:13 ` Stephen Warren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52262629.8010605@wwwdotorg.org \
    --to=swarren@wwwdotorg.org \
    --cc=josephl@nvidia.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=mturquette@linaro.org \
    --cc=pdeschrijver@nvidia.com \
    --cc=pgaikwad@nvidia.com \
    --cc=pwalmsley@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox