summaryrefslogtreecommitdiff
path: root/include/linux/timex.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-02-22 15:48:43 +0100
committerIngo Molnar <mingo@elte.hu>2009-02-25 18:38:15 +0100
commit2b9d1496e7835a603c340e8f0dd81f4b74d5f248 (patch)
tree419904a23470733179a0ecd647263777b2f8e780 /include/linux/timex.h
parente96291653b2e4df02f160b574070f6e632868e5e (diff)
time: ntp: make 64-bit constants more robust
Impact: cleanup, no functionality changed - make PPM_SCALE an explicit s64 constant, to remove (s64) casts from usage sites. kernel/time/ntp.o: text data bss dec hex filename 2536 114 136 2786 ae2 ntp.o.before 2536 114 136 2786 ae2 ntp.o.after md5: 40a7728d1188aa18e83e21a81fa7b150 ntp.o.before.asm 40a7728d1188aa18e83e21a81fa7b150 ntp.o.after.asm Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/timex.h')
-rw-r--r--include/linux/timex.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/timex.h b/include/linux/timex.h
index 998a55d80acf..aa3475fcff64 100644
--- a/include/linux/timex.h
+++ b/include/linux/timex.h
@@ -190,7 +190,7 @@ struct timex {
* offset and maximum frequency tolerance.
*/
#define SHIFT_USEC 16 /* frequency offset scale (shift) */
-#define PPM_SCALE (NSEC_PER_USEC << (NTP_SCALE_SHIFT - SHIFT_USEC))
+#define PPM_SCALE ((s64)NSEC_PER_USEC << (NTP_SCALE_SHIFT - SHIFT_USEC))
#define PPM_SCALE_INV_SHIFT 19
#define PPM_SCALE_INV ((1ll << (PPM_SCALE_INV_SHIFT + NTP_SCALE_SHIFT)) / \
PPM_SCALE + 1)