diff options
-rw-r--r-- | kernel/sched.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index ed09d4f2a69c..dc85ceb90832 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -3513,9 +3513,9 @@ void task_times(struct task_struct *p, cputime_t *ut, cputime_t *st) | |||
3513 | rtime = nsecs_to_cputime(p->se.sum_exec_runtime); | 3513 | rtime = nsecs_to_cputime(p->se.sum_exec_runtime); |
3514 | 3514 | ||
3515 | if (total) { | 3515 | if (total) { |
3516 | u64 temp; | 3516 | u64 temp = rtime; |
3517 | 3517 | ||
3518 | temp = (u64)(rtime * utime); | 3518 | temp *= utime; |
3519 | do_div(temp, total); | 3519 | do_div(temp, total); |
3520 | utime = (cputime_t)temp; | 3520 | utime = (cputime_t)temp; |
3521 | } else | 3521 | } else |
@@ -3546,9 +3546,9 @@ void thread_group_times(struct task_struct *p, cputime_t *ut, cputime_t *st) | |||
3546 | rtime = nsecs_to_cputime(cputime.sum_exec_runtime); | 3546 | rtime = nsecs_to_cputime(cputime.sum_exec_runtime); |
3547 | 3547 | ||
3548 | if (total) { | 3548 | if (total) { |
3549 | u64 temp; | 3549 | u64 temp = rtime; |
3550 | 3550 | ||
3551 | temp = (u64)(rtime * cputime.utime); | 3551 | temp *= cputime.utime; |
3552 | do_div(temp, total); | 3552 | do_div(temp, total); |
3553 | utime = (cputime_t)temp; | 3553 | utime = (cputime_t)temp; |
3554 | } else | 3554 | } else |