mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
e96291653b
commit
2b9d1496e7
2 changed files with 3 additions and 3 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue