projects
/
platform
/
kernel
/
linux-arm64.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
78becc2
)
sched: Use swap() macro in scale_stime()
author
Stanislaw Gruszka
<sgruszka@redhat.com>
Thu, 2 May 2013 13:34:33 +0000
(15:34 +0200)
committer
Ingo Molnar
<mingo@kernel.org>
Tue, 28 May 2013 09:58:10 +0000
(11:58 +0200)
Simple cleanup.
Reported-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Link:
http://lkml.kernel.org/r/1367501673-6563-1-git-send-email-sgruszka@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/sched/cputime.c
patch
|
blob
|
history
diff --git
a/kernel/sched/cputime.c
b/kernel/sched/cputime.c
index
cc2dc3e
..
94691bc
100644
(file)
--- a/
kernel/sched/cputime.c
+++ b/
kernel/sched/cputime.c
@@
-515,9
+515,8
@@
static cputime_t scale_stime(u64 stime, u64 rtime, u64 total)
for (;;) {
/* Make sure "rtime" is the bigger of stime/rtime */
- if (stime > rtime) {
- u64 tmp = rtime; rtime = stime; stime = tmp;
- }
+ if (stime > rtime)
+ swap(rtime, stime);
/* Make sure 'total' fits in 32 bits */
if (total >> 32)