diff options
author | Daniel Walker <dwalker@mvista.com> | 2006-12-10 05:21:33 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-10 12:57:22 -0500 |
commit | f5f1a24a2caa299bb7d294aee92d7dd3410d9ed7 (patch) | |
tree | 499a2687c2e29733974d1721d238c561078b46c5 /kernel/timer.c | |
parent | 2b0137001de68153203dd3bc20e6d27eb7c9719c (diff) |
[PATCH] clocksource: small cleanup
Mostly changing alignment. Just some general cleanup.
[akpm@osdl.org: build fix]
Signed-off-by: Daniel Walker <dwalker@mvista.com>
Acked-by: John Stultz <johnstul@us.ibm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/timer.c')
-rw-r--r-- | kernel/timer.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/kernel/timer.c b/kernel/timer.c index b1f40f256eb0..0256ab443d8a 100644 --- a/kernel/timer.c +++ b/kernel/timer.c | |||
@@ -846,7 +846,7 @@ static int change_clocksource(void) | |||
846 | clock = new; | 846 | clock = new; |
847 | clock->cycle_last = now; | 847 | clock->cycle_last = now; |
848 | printk(KERN_INFO "Time: %s clocksource has been installed.\n", | 848 | printk(KERN_INFO "Time: %s clocksource has been installed.\n", |
849 | clock->name); | 849 | clock->name); |
850 | return 1; | 850 | return 1; |
851 | } else if (clock->update_callback) { | 851 | } else if (clock->update_callback) { |
852 | return clock->update_callback(); | 852 | return clock->update_callback(); |
@@ -854,7 +854,10 @@ static int change_clocksource(void) | |||
854 | return 0; | 854 | return 0; |
855 | } | 855 | } |
856 | #else | 856 | #else |
857 | #define change_clocksource() (0) | 857 | static inline int change_clocksource(void) |
858 | { | ||
859 | return 0; | ||
860 | } | ||
858 | #endif | 861 | #endif |
859 | 862 | ||
860 | /** | 863 | /** |
@@ -952,7 +955,8 @@ device_initcall(timekeeping_init_device); | |||
952 | * If the error is already larger, we look ahead even further | 955 | * If the error is already larger, we look ahead even further |
953 | * to compensate for late or lost adjustments. | 956 | * to compensate for late or lost adjustments. |
954 | */ | 957 | */ |
955 | static __always_inline int clocksource_bigadjust(s64 error, s64 *interval, s64 *offset) | 958 | static __always_inline int clocksource_bigadjust(s64 error, s64 *interval, |
959 | s64 *offset) | ||
956 | { | 960 | { |
957 | s64 tick_error, i; | 961 | s64 tick_error, i; |
958 | u32 look_ahead, adj; | 962 | u32 look_ahead, adj; |
@@ -976,7 +980,8 @@ static __always_inline int clocksource_bigadjust(s64 error, s64 *interval, s64 * | |||
976 | * Now calculate the error in (1 << look_ahead) ticks, but first | 980 | * Now calculate the error in (1 << look_ahead) ticks, but first |
977 | * remove the single look ahead already included in the error. | 981 | * remove the single look ahead already included in the error. |
978 | */ | 982 | */ |
979 | tick_error = current_tick_length() >> (TICK_LENGTH_SHIFT - clock->shift + 1); | 983 | tick_error = current_tick_length() >> |
984 | (TICK_LENGTH_SHIFT - clock->shift + 1); | ||
980 | tick_error -= clock->xtime_interval >> 1; | 985 | tick_error -= clock->xtime_interval >> 1; |
981 | error = ((error - tick_error) >> look_ahead) + tick_error; | 986 | error = ((error - tick_error) >> look_ahead) + tick_error; |
982 | 987 | ||
@@ -1028,7 +1033,8 @@ static void clocksource_adjust(struct clocksource *clock, s64 offset) | |||
1028 | clock->mult += adj; | 1033 | clock->mult += adj; |
1029 | clock->xtime_interval += interval; | 1034 | clock->xtime_interval += interval; |
1030 | clock->xtime_nsec -= offset; | 1035 | clock->xtime_nsec -= offset; |
1031 | clock->error -= (interval - offset) << (TICK_LENGTH_SHIFT - clock->shift); | 1036 | clock->error -= (interval - offset) << |
1037 | (TICK_LENGTH_SHIFT - clock->shift); | ||
1032 | } | 1038 | } |
1033 | 1039 | ||
1034 | /** | 1040 | /** |