On 14 May 2013 21:45, Stephen Warren swarren@wwwdotorg.org wrote:
On 05/14/2013 07:46 AM, Viresh Kumar wrote: ...
This must address your concerns: @Rafael: I have attached both patches now for you to apply.
From: Viresh Kumar viresh.kumar@linaro.org Date: Tue, 14 May 2013 19:08:50 +0530 Subject: [PATCH 1/2] cpufreq: tegra: Remove irrelevant comment
Tegra cpufreq driver doesn't use .index field of cpufreq_frequency_table and so comment mentioning order of .index is irrelevant. Remove it.
diff --git a/drivers/cpufreq/tegra-cpufreq.c b/drivers/cpufreq/tegra-cpufreq.c
-/* Frequency table index must be sequential starting at 0 */ static struct cpufreq_frequency_table freq_table[] = { { 0, 216000 }, { 1, 312000 },
Does the .index/.data field even need to be filled in any more?
No. But i didn't wanted to write following code: { .frequency = *** }, as earlier one was fine too.
Ack whichever version you want (Attached too):
-----------x-----------------x-----------------
From: Viresh Kumar viresh.kumar@linaro.org Date: Tue, 14 May 2013 19:08:50 +0530 Subject: [PATCH] cpufreq: tegra: Don't initialize .index field of cpufreq_frequency_table
Tegra cpufreq driver doesn't use .index field of cpufreq_frequency_table and so we don't need to initialize it. Don't initialize it.
Signed-off-by: Viresh Kumar viresh.kumar@linaro.org --- drivers/cpufreq/tegra-cpufreq.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-)
diff --git a/drivers/cpufreq/tegra-cpufreq.c b/drivers/cpufreq/tegra-cpufreq.c index c74c0e1..81561be 100644 --- a/drivers/cpufreq/tegra-cpufreq.c +++ b/drivers/cpufreq/tegra-cpufreq.c @@ -28,17 +28,16 @@ #include <linux/io.h> #include <linux/suspend.h>
-/* Frequency table index must be sequential starting at 0 */ static struct cpufreq_frequency_table freq_table[] = { - { 0, 216000 }, - { 1, 312000 }, - { 2, 456000 }, - { 3, 608000 }, - { 4, 760000 }, - { 5, 816000 }, - { 6, 912000 }, - { 7, 1000000 }, - { 8, CPUFREQ_TABLE_END }, + { .frequency = 216000 }, + { .frequency = 312000 }, + { .frequency = 456000 }, + { .frequency = 608000 }, + { .frequency = 760000 }, + { .frequency = 816000 }, + { .frequency = 912000 }, + { .frequency = 1000000 }, + { .frequency = CPUFREQ_TABLE_END }, };
#define NUM_CPUS 2