[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:
@ -12,10 +12,10 @@ static int uptime_proc_show(struct seq_file *m, void *v)
|
||||
struct timespec uptime;
|
||||
struct timespec idle;
|
||||
int i;
|
||||
cputime_t idletime = cputime_zero;
|
||||
cputime_t idletime = 0;
|
||||
|
||||
for_each_possible_cpu(i)
|
||||
idletime = cputime64_add(idletime, kstat_cpu(i).cpustat.idle);
|
||||
idletime += kstat_cpu(i).cpustat.idle;
|
||||
|
||||
do_posix_clock_monotonic_gettime(&uptime);
|
||||
monotonic_to_bootbased(&uptime);
|
||||
|
Reference in New Issue
Block a user