Reported-by: Peter Zijlstra <[email protected]>
Signed-off-by: Stanislaw Gruszka <[email protected]>
---
 kernel/sched/cputime.c | 5 ++---
 1 file 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)
-- 
1.7.11.7

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to