diff options
author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2011-12-15 08:56:09 -0500 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2011-12-15 08:56:19 -0500 |
commit | 648616343cdbe904c585a6c12e323d3b3c72e46f (patch) | |
tree | 514bce1b52663db4ab5662b637c764cf3c2ed1eb /drivers/cpufreq/cpufreq_stats.c | |
parent | 55b02d2f4445ad625213817a1736bf2884d32547 (diff) |
[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>
Diffstat (limited to 'drivers/cpufreq/cpufreq_stats.c')
-rw-r--r-- | drivers/cpufreq/cpufreq_stats.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/cpufreq/cpufreq_stats.c b/drivers/cpufreq/cpufreq_stats.c index c5072a91e848..2a508edd768b 100644 --- a/drivers/cpufreq/cpufreq_stats.c +++ b/drivers/cpufreq/cpufreq_stats.c | |||
@@ -61,9 +61,8 @@ static int cpufreq_stats_update(unsigned int cpu) | |||
61 | spin_lock(&cpufreq_stats_lock); | 61 | spin_lock(&cpufreq_stats_lock); |
62 | stat = per_cpu(cpufreq_stats_table, cpu); | 62 | stat = per_cpu(cpufreq_stats_table, cpu); |
63 | if (stat->time_in_state) | 63 | if (stat->time_in_state) |
64 | stat->time_in_state[stat->last_index] = | 64 | stat->time_in_state[stat->last_index] += |
65 | cputime64_add(stat->time_in_state[stat->last_index], | 65 | cur_time - stat->last_time; |
66 | cputime_sub(cur_time, stat->last_time)); | ||
67 | stat->last_time = cur_time; | 66 | stat->last_time = cur_time; |
68 | spin_unlock(&cpufreq_stats_lock); | 67 | spin_unlock(&cpufreq_stats_lock); |
69 | return 0; | 68 | return 0; |