Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 84f9f3a1 authored by Stanislaw Gruszka's avatar Stanislaw Gruszka Committed by Ingo Molnar
Browse files

sched: Use swap() macro in scale_stime()



Simple cleanup.

Reported-by: default avatarPeter Zijlstra <peterz@infradead.org>
Signed-off-by: default avatarStanislaw 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: default avatarIngo Molnar <mingo@kernel.org>
parent 78becc27
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -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)