diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2012-10-25 18:51:21 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2012-11-14 18:33:08 -0500 |
commit | 1e7586a18a2ab69a160837c0a4be31f7147cfb5e (patch) | |
tree | d91de5c87bc55a0abf8c378cae8b0c2ef7a39e40 | |
parent | 4471a34f9a1f2da220272e823bdb8e8fa83a7661 (diff) |
cpufreq: Fix sparse warnings by updating cputime64_t to u64
There were few sparse warnings due to mismatch of type on function arguments.
Two types were used u64 and cputime64_t. Both are actually u64, so use u64 only.
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r-- | drivers/cpufreq/cpufreq_governor.c | 4 | ||||
-rw-r--r-- | drivers/cpufreq/cpufreq_governor.h | 11 | ||||
-rw-r--r-- | drivers/cpufreq/cpufreq_stats.c | 4 |
3 files changed, 9 insertions, 10 deletions
diff --git a/drivers/cpufreq/cpufreq_governor.c b/drivers/cpufreq/cpufreq_governor.c index 5ea2c829a796..be9d255e292f 100644 --- a/drivers/cpufreq/cpufreq_governor.c +++ b/drivers/cpufreq/cpufreq_governor.c | |||
@@ -50,7 +50,7 @@ static inline u64 get_cpu_idle_time_jiffy(unsigned int cpu, u64 *wall) | |||
50 | return jiffies_to_usecs(idle_time); | 50 | return jiffies_to_usecs(idle_time); |
51 | } | 51 | } |
52 | 52 | ||
53 | cputime64_t get_cpu_idle_time(unsigned int cpu, cputime64_t *wall) | 53 | u64 get_cpu_idle_time(unsigned int cpu, u64 *wall) |
54 | { | 54 | { |
55 | u64 idle_time = get_cpu_idle_time_us(cpu, NULL); | 55 | u64 idle_time = get_cpu_idle_time_us(cpu, NULL); |
56 | 56 | ||
@@ -83,7 +83,7 @@ void dbs_check_cpu(struct dbs_data *dbs_data, int cpu) | |||
83 | /* Get Absolute Load (in terms of freq for ondemand gov) */ | 83 | /* Get Absolute Load (in terms of freq for ondemand gov) */ |
84 | for_each_cpu(j, policy->cpus) { | 84 | for_each_cpu(j, policy->cpus) { |
85 | struct cpu_dbs_common_info *j_cdbs; | 85 | struct cpu_dbs_common_info *j_cdbs; |
86 | cputime64_t cur_wall_time, cur_idle_time, cur_iowait_time; | 86 | u64 cur_wall_time, cur_idle_time, cur_iowait_time; |
87 | unsigned int idle_time, wall_time, iowait_time; | 87 | unsigned int idle_time, wall_time, iowait_time; |
88 | unsigned int load; | 88 | unsigned int load; |
89 | 89 | ||
diff --git a/drivers/cpufreq/cpufreq_governor.h b/drivers/cpufreq/cpufreq_governor.h index 34e14adfc3f9..f6616540c53d 100644 --- a/drivers/cpufreq/cpufreq_governor.h +++ b/drivers/cpufreq/cpufreq_governor.h | |||
@@ -17,7 +17,6 @@ | |||
17 | #ifndef _CPUFREQ_GOVERNER_H | 17 | #ifndef _CPUFREQ_GOVERNER_H |
18 | #define _CPUFREQ_GOVERNER_H | 18 | #define _CPUFREQ_GOVERNER_H |
19 | 19 | ||
20 | #include <asm/cputime.h> | ||
21 | #include <linux/cpufreq.h> | 20 | #include <linux/cpufreq.h> |
22 | #include <linux/kobject.h> | 21 | #include <linux/kobject.h> |
23 | #include <linux/mutex.h> | 22 | #include <linux/mutex.h> |
@@ -72,9 +71,9 @@ static void *get_cpu_dbs_info_s(int cpu) \ | |||
72 | /* Per cpu structures */ | 71 | /* Per cpu structures */ |
73 | struct cpu_dbs_common_info { | 72 | struct cpu_dbs_common_info { |
74 | int cpu; | 73 | int cpu; |
75 | cputime64_t prev_cpu_idle; | 74 | u64 prev_cpu_idle; |
76 | cputime64_t prev_cpu_wall; | 75 | u64 prev_cpu_wall; |
77 | cputime64_t prev_cpu_nice; | 76 | u64 prev_cpu_nice; |
78 | struct cpufreq_policy *cur_policy; | 77 | struct cpufreq_policy *cur_policy; |
79 | struct delayed_work work; | 78 | struct delayed_work work; |
80 | /* | 79 | /* |
@@ -87,7 +86,7 @@ struct cpu_dbs_common_info { | |||
87 | 86 | ||
88 | struct od_cpu_dbs_info_s { | 87 | struct od_cpu_dbs_info_s { |
89 | struct cpu_dbs_common_info cdbs; | 88 | struct cpu_dbs_common_info cdbs; |
90 | cputime64_t prev_cpu_iowait; | 89 | u64 prev_cpu_iowait; |
91 | struct cpufreq_frequency_table *freq_table; | 90 | struct cpufreq_frequency_table *freq_table; |
92 | unsigned int freq_lo; | 91 | unsigned int freq_lo; |
93 | unsigned int freq_lo_jiffies; | 92 | unsigned int freq_lo_jiffies; |
@@ -170,7 +169,7 @@ static inline int delay_for_sampling_rate(unsigned int sampling_rate) | |||
170 | return delay; | 169 | return delay; |
171 | } | 170 | } |
172 | 171 | ||
173 | cputime64_t get_cpu_idle_time(unsigned int cpu, cputime64_t *wall); | 172 | u64 get_cpu_idle_time(unsigned int cpu, u64 *wall); |
174 | void dbs_check_cpu(struct dbs_data *dbs_data, int cpu); | 173 | void dbs_check_cpu(struct dbs_data *dbs_data, int cpu); |
175 | int cpufreq_governor_dbs(struct dbs_data *dbs_data, | 174 | int cpufreq_governor_dbs(struct dbs_data *dbs_data, |
176 | struct cpufreq_policy *policy, unsigned int event); | 175 | struct cpufreq_policy *policy, unsigned int event); |
diff --git a/drivers/cpufreq/cpufreq_stats.c b/drivers/cpufreq/cpufreq_stats.c index 399831690fed..e40e50809644 100644 --- a/drivers/cpufreq/cpufreq_stats.c +++ b/drivers/cpufreq/cpufreq_stats.c | |||
@@ -37,7 +37,7 @@ struct cpufreq_stats { | |||
37 | unsigned int max_state; | 37 | unsigned int max_state; |
38 | unsigned int state_num; | 38 | unsigned int state_num; |
39 | unsigned int last_index; | 39 | unsigned int last_index; |
40 | cputime64_t *time_in_state; | 40 | u64 *time_in_state; |
41 | unsigned int *freq_table; | 41 | unsigned int *freq_table; |
42 | #ifdef CONFIG_CPU_FREQ_STAT_DETAILS | 42 | #ifdef CONFIG_CPU_FREQ_STAT_DETAILS |
43 | unsigned int *trans_table; | 43 | unsigned int *trans_table; |
@@ -223,7 +223,7 @@ static int cpufreq_stats_create_table(struct cpufreq_policy *policy, | |||
223 | count++; | 223 | count++; |
224 | } | 224 | } |
225 | 225 | ||
226 | alloc_size = count * sizeof(int) + count * sizeof(cputime64_t); | 226 | alloc_size = count * sizeof(int) + count * sizeof(u64); |
227 | 227 | ||
228 | #ifdef CONFIG_CPU_FREQ_STAT_DETAILS | 228 | #ifdef CONFIG_CPU_FREQ_STAT_DETAILS |
229 | alloc_size += count * count * sizeof(int); | 229 | alloc_size += count * count * sizeof(int); |