aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStanislaw Gruszka <sgruszka@redhat.com>2013-05-02 15:34:33 +0200
committerIngo Molnar <mingo@kernel.org>2013-05-28 11:58:10 +0200
commit84f9f3a15611536537d59060818a2354d5039ff3 (patch)
tree5adb3d5962207836605ab47effedcc49b12697f2
parent78becc27097585c6aec7043834cadde950ae79f2 (diff)
downloadkernel_goldelico_gta04-84f9f3a15611536537d59060818a2354d5039ff3.zip
kernel_goldelico_gta04-84f9f3a15611536537d59060818a2354d5039ff3.tar.gz
kernel_goldelico_gta04-84f9f3a15611536537d59060818a2354d5039ff3.tar.bz2
sched: Use swap() macro in scale_stime()
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>
-rw-r--r--kernel/sched/cputime.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/kernel/sched/cputime.c b/kernel/sched/cputime.c
index cc2dc3e..94691bc 100644
--- 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)