This converts a few users of do_div to div_[su]64 and this demonstrates<snip>
nicely how it can reduce some expressions to one-liners.
Signed-off-by: Roman Zippel <zippel@xxxxxxxxxxxxxx>
---
kernel/time.c | 29 +++++++++--------------------
kernel/time/ntp.c | 25 ++++++-------------------
2 files changed, 15 insertions(+), 39 deletions(-)
Index: linux-2.6/kernel/time/ntp.c<snip>
===================================================================
--- linux-2.6.orig/kernel/time/ntp.c 2008-03-11 17:15:14.000000000 +0100
+++ linux-2.6/kernel/time/ntp.c 2008-03-12 21:21:20.000000000 +0100
/*
@@ -53,10 +53,8 @@ static void ntp_update_frequency(void)
tick_length_base = second_length;
- do_div(second_length, HZ);
- tick_nsec = second_length >> TICK_LENGTH_SHIFT;
-
- do_div(tick_length_base, NTP_INTERVAL_FREQ);
+ tick_nsec = div_u64(second_length, HZ) >> TICK_LENGTH_SHIFT;
+ tick_length_base = div_u64(tick_length_base, NTP_INTERVAL_FREQ);
}