Commit 9531347c authored by Viresh Kumar's avatar Viresh Kumar Committed by Rafael J. Wysocki

cpufreq: stats: initialize 'cur_time' on its definition

'cur_time' is defined in the first line and is then assigned a value
in the next line. Initialize it while defining it.
Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 43b9cdaf
...@@ -36,9 +36,8 @@ static DEFINE_PER_CPU(struct cpufreq_stats *, cpufreq_stats_table); ...@@ -36,9 +36,8 @@ static DEFINE_PER_CPU(struct cpufreq_stats *, cpufreq_stats_table);
static int cpufreq_stats_update(unsigned int cpu) static int cpufreq_stats_update(unsigned int cpu)
{ {
struct cpufreq_stats *stat; struct cpufreq_stats *stat;
unsigned long long cur_time; unsigned long long cur_time = get_jiffies_64();
cur_time = get_jiffies_64();
spin_lock(&cpufreq_stats_lock); spin_lock(&cpufreq_stats_lock);
stat = per_cpu(cpufreq_stats_table, cpu); stat = per_cpu(cpufreq_stats_table, cpu);
if (stat->time_in_state) if (stat->time_in_state)
......
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