Commit 1e7586a1 authored by Viresh Kumar's avatar Viresh Kumar Committed by Rafael J. Wysocki

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: default avatarFengguang Wu <fengguang.wu@intel.com>
Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 4471a34f
...@@ -50,7 +50,7 @@ static inline u64 get_cpu_idle_time_jiffy(unsigned int cpu, u64 *wall) ...@@ -50,7 +50,7 @@ static inline u64 get_cpu_idle_time_jiffy(unsigned int cpu, u64 *wall)
return jiffies_to_usecs(idle_time); return jiffies_to_usecs(idle_time);
} }
cputime64_t get_cpu_idle_time(unsigned int cpu, cputime64_t *wall) u64 get_cpu_idle_time(unsigned int cpu, u64 *wall)
{ {
u64 idle_time = get_cpu_idle_time_us(cpu, NULL); u64 idle_time = get_cpu_idle_time_us(cpu, NULL);
...@@ -83,7 +83,7 @@ void dbs_check_cpu(struct dbs_data *dbs_data, int cpu) ...@@ -83,7 +83,7 @@ void dbs_check_cpu(struct dbs_data *dbs_data, int cpu)
/* Get Absolute Load (in terms of freq for ondemand gov) */ /* Get Absolute Load (in terms of freq for ondemand gov) */
for_each_cpu(j, policy->cpus) { for_each_cpu(j, policy->cpus) {
struct cpu_dbs_common_info *j_cdbs; struct cpu_dbs_common_info *j_cdbs;
cputime64_t cur_wall_time, cur_idle_time, cur_iowait_time; u64 cur_wall_time, cur_idle_time, cur_iowait_time;
unsigned int idle_time, wall_time, iowait_time; unsigned int idle_time, wall_time, iowait_time;
unsigned int load; unsigned int load;
......
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
#ifndef _CPUFREQ_GOVERNER_H #ifndef _CPUFREQ_GOVERNER_H
#define _CPUFREQ_GOVERNER_H #define _CPUFREQ_GOVERNER_H
#include <asm/cputime.h>
#include <linux/cpufreq.h> #include <linux/cpufreq.h>
#include <linux/kobject.h> #include <linux/kobject.h>
#include <linux/mutex.h> #include <linux/mutex.h>
...@@ -72,9 +71,9 @@ static void *get_cpu_dbs_info_s(int cpu) \ ...@@ -72,9 +71,9 @@ static void *get_cpu_dbs_info_s(int cpu) \
/* Per cpu structures */ /* Per cpu structures */
struct cpu_dbs_common_info { struct cpu_dbs_common_info {
int cpu; int cpu;
cputime64_t prev_cpu_idle; u64 prev_cpu_idle;
cputime64_t prev_cpu_wall; u64 prev_cpu_wall;
cputime64_t prev_cpu_nice; u64 prev_cpu_nice;
struct cpufreq_policy *cur_policy; struct cpufreq_policy *cur_policy;
struct delayed_work work; struct delayed_work work;
/* /*
...@@ -87,7 +86,7 @@ struct cpu_dbs_common_info { ...@@ -87,7 +86,7 @@ struct cpu_dbs_common_info {
struct od_cpu_dbs_info_s { struct od_cpu_dbs_info_s {
struct cpu_dbs_common_info cdbs; struct cpu_dbs_common_info cdbs;
cputime64_t prev_cpu_iowait; u64 prev_cpu_iowait;
struct cpufreq_frequency_table *freq_table; struct cpufreq_frequency_table *freq_table;
unsigned int freq_lo; unsigned int freq_lo;
unsigned int freq_lo_jiffies; unsigned int freq_lo_jiffies;
...@@ -170,7 +169,7 @@ static inline int delay_for_sampling_rate(unsigned int sampling_rate) ...@@ -170,7 +169,7 @@ static inline int delay_for_sampling_rate(unsigned int sampling_rate)
return delay; return delay;
} }
cputime64_t get_cpu_idle_time(unsigned int cpu, cputime64_t *wall); u64 get_cpu_idle_time(unsigned int cpu, u64 *wall);
void dbs_check_cpu(struct dbs_data *dbs_data, int cpu); void dbs_check_cpu(struct dbs_data *dbs_data, int cpu);
int cpufreq_governor_dbs(struct dbs_data *dbs_data, int cpufreq_governor_dbs(struct dbs_data *dbs_data,
struct cpufreq_policy *policy, unsigned int event); struct cpufreq_policy *policy, unsigned int event);
......
...@@ -37,7 +37,7 @@ struct cpufreq_stats { ...@@ -37,7 +37,7 @@ struct cpufreq_stats {
unsigned int max_state; unsigned int max_state;
unsigned int state_num; unsigned int state_num;
unsigned int last_index; unsigned int last_index;
cputime64_t *time_in_state; u64 *time_in_state;
unsigned int *freq_table; unsigned int *freq_table;
#ifdef CONFIG_CPU_FREQ_STAT_DETAILS #ifdef CONFIG_CPU_FREQ_STAT_DETAILS
unsigned int *trans_table; unsigned int *trans_table;
...@@ -223,7 +223,7 @@ static int cpufreq_stats_create_table(struct cpufreq_policy *policy, ...@@ -223,7 +223,7 @@ static int cpufreq_stats_create_table(struct cpufreq_policy *policy,
count++; count++;
} }
alloc_size = count * sizeof(int) + count * sizeof(cputime64_t); alloc_size = count * sizeof(int) + count * sizeof(u64);
#ifdef CONFIG_CPU_FREQ_STAT_DETAILS #ifdef CONFIG_CPU_FREQ_STAT_DETAILS
alloc_size += count * count * sizeof(int); alloc_size += count * count * sizeof(int);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment