x86, vmi: TSC going backwards check in vmi clocksource, cleanup
authorAlok Kataria <akataria@vmware.com>
Fri, 20 Feb 2009 18:23:18 +0000 (10:23 -0800)
committerIngo Molnar <mingo@elte.hu>
Fri, 20 Feb 2009 18:31:03 +0000 (19:31 +0100)
clean up vmi_read_cycles to use max()

Reported-b: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alok N Kataria <akataria@vmware.com>
Cc: Zach Amsden <zach@vmware.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/vmiclock_32.c

index 9cd28c04952ad939a36ebb9455571a5bf5d2a54b..b77ad5789af9858ecfc60f959e5759dc9022866b 100644 (file)
@@ -288,8 +288,7 @@ static struct clocksource clocksource_vmi;
 static cycle_t read_real_cycles(void)
 {
        cycle_t ret = (cycle_t)vmi_timer_ops.get_cycle_counter(VMI_CYCLES_REAL);
-       return ret >= clocksource_vmi.cycle_last ?
-               ret : clocksource_vmi.cycle_last;
+       return max(ret, clocksource_vmi.cycle_last);
 }
 
 static struct clocksource clocksource_vmi = {