[S390] cputime: add sparse checking and cleanup
Make cputime_t and cputime64_t nocast to enable sparse checking to detect incorrect use of cputime. Drop the cputime macros for simple scalar operations. The conversion macros are still needed. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:
@@ -61,9 +61,8 @@ static int cpufreq_stats_update(unsigned int cpu)
|
||||
spin_lock(&cpufreq_stats_lock);
|
||||
stat = per_cpu(cpufreq_stats_table, cpu);
|
||||
if (stat->time_in_state)
|
||||
stat->time_in_state[stat->last_index] =
|
||||
cputime64_add(stat->time_in_state[stat->last_index],
|
||||
cputime_sub(cur_time, stat->last_time));
|
||||
stat->time_in_state[stat->last_index] +=
|
||||
cur_time - stat->last_time;
|
||||
stat->last_time = cur_time;
|
||||
spin_unlock(&cpufreq_stats_lock);
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user