Re: [PATCH V1 resend] cpufreq: Raname index as data in cpufreq_frequency_table

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 14 May 2013 21:45, Stephen Warren <swarren@xxxxxxxxxxxxx> 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@xxxxxxxxxx>
>> 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@xxxxxxxxxx>
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@xxxxxxxxxx>
---
 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

Attachment: 0001-cpufreq-tegra-Don-t-initialize-.index-field-of-cpufr.patch
Description: Binary data


[Index of Archives]     [Linux Kernel Devel]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Forum]     [Linux SCSI]

  Powered by Linux