diff options
Diffstat (limited to 'kernel/time.c')
-rw-r--r-- | kernel/time.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/time.c b/kernel/time.c index cbe0d5a222ff..6a08660b4fac 100644 --- a/kernel/time.c +++ b/kernel/time.c | |||
@@ -246,7 +246,7 @@ unsigned int inline jiffies_to_msecs(const unsigned long j) | |||
246 | return (j + (HZ / MSEC_PER_SEC) - 1)/(HZ / MSEC_PER_SEC); | 246 | return (j + (HZ / MSEC_PER_SEC) - 1)/(HZ / MSEC_PER_SEC); |
247 | #else | 247 | #else |
248 | # if BITS_PER_LONG == 32 | 248 | # if BITS_PER_LONG == 32 |
249 | return ((u64)HZ_TO_MSEC_MUL32 * j) >> HZ_TO_MSEC_SHR32; | 249 | return (HZ_TO_MSEC_MUL32 * j) >> HZ_TO_MSEC_SHR32; |
250 | # else | 250 | # else |
251 | return (j * HZ_TO_MSEC_NUM) / HZ_TO_MSEC_DEN; | 251 | return (j * HZ_TO_MSEC_NUM) / HZ_TO_MSEC_DEN; |
252 | # endif | 252 | # endif |
@@ -262,7 +262,7 @@ unsigned int inline jiffies_to_usecs(const unsigned long j) | |||
262 | return (j + (HZ / USEC_PER_SEC) - 1)/(HZ / USEC_PER_SEC); | 262 | return (j + (HZ / USEC_PER_SEC) - 1)/(HZ / USEC_PER_SEC); |
263 | #else | 263 | #else |
264 | # if BITS_PER_LONG == 32 | 264 | # if BITS_PER_LONG == 32 |
265 | return ((u64)HZ_TO_USEC_MUL32 * j) >> HZ_TO_USEC_SHR32; | 265 | return (HZ_TO_USEC_MUL32 * j) >> HZ_TO_USEC_SHR32; |
266 | # else | 266 | # else |
267 | return (j * HZ_TO_USEC_NUM) / HZ_TO_USEC_DEN; | 267 | return (j * HZ_TO_USEC_NUM) / HZ_TO_USEC_DEN; |
268 | # endif | 268 | # endif |
@@ -476,7 +476,7 @@ unsigned long msecs_to_jiffies(const unsigned int m) | |||
476 | if (HZ > MSEC_PER_SEC && m > jiffies_to_msecs(MAX_JIFFY_OFFSET)) | 476 | if (HZ > MSEC_PER_SEC && m > jiffies_to_msecs(MAX_JIFFY_OFFSET)) |
477 | return MAX_JIFFY_OFFSET; | 477 | return MAX_JIFFY_OFFSET; |
478 | 478 | ||
479 | return ((u64)MSEC_TO_HZ_MUL32 * m + MSEC_TO_HZ_ADJ32) | 479 | return (MSEC_TO_HZ_MUL32 * m + MSEC_TO_HZ_ADJ32) |
480 | >> MSEC_TO_HZ_SHR32; | 480 | >> MSEC_TO_HZ_SHR32; |
481 | #endif | 481 | #endif |
482 | } | 482 | } |
@@ -491,7 +491,7 @@ unsigned long usecs_to_jiffies(const unsigned int u) | |||
491 | #elif HZ > USEC_PER_SEC && !(HZ % USEC_PER_SEC) | 491 | #elif HZ > USEC_PER_SEC && !(HZ % USEC_PER_SEC) |
492 | return u * (HZ / USEC_PER_SEC); | 492 | return u * (HZ / USEC_PER_SEC); |
493 | #else | 493 | #else |
494 | return ((u64)USEC_TO_HZ_MUL32 * u + USEC_TO_HZ_ADJ32) | 494 | return (USEC_TO_HZ_MUL32 * u + USEC_TO_HZ_ADJ32) |
495 | >> USEC_TO_HZ_SHR32; | 495 | >> USEC_TO_HZ_SHR32; |
496 | #endif | 496 | #endif |
497 | } | 497 | } |