diff options
author | hank <pyu@redhat.com> | 2011-09-20 16:53:39 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-09-21 04:28:51 -0400 |
commit | cbbc719fccdb8cbd87350a05c0d33167c9b79365 (patch) | |
tree | f62c754b5e74756024b16abaad69a70779a6a84d /kernel | |
parent | 4523f6ada86853750565c68e17126af2e3df9b8a (diff) |
time: Change jiffies_to_clock_t() argument type to unsigned long
The parameter's origin type is long. On an i386 architecture, it can
easily be larger than 0x80000000, causing this function to convert it
to a sign-extended u64 type.
Change the type to unsigned long so we get the correct result.
Signed-off-by: hank <pyu@redhat.com>
Cc: John Stultz <john.stultz@linaro.org>
Cc: <stable@kernel.org>
[ build fix ]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/time.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/time.c b/kernel/time.c index 8e8dc6d705c..d7760621452 100644 --- a/kernel/time.c +++ b/kernel/time.c | |||
@@ -575,7 +575,7 @@ EXPORT_SYMBOL(jiffies_to_timeval); | |||
575 | /* | 575 | /* |
576 | * Convert jiffies/jiffies_64 to clock_t and back. | 576 | * Convert jiffies/jiffies_64 to clock_t and back. |
577 | */ | 577 | */ |
578 | clock_t jiffies_to_clock_t(long x) | 578 | clock_t jiffies_to_clock_t(unsigned long x) |
579 | { | 579 | { |
580 | #if (TICK_NSEC % (NSEC_PER_SEC / USER_HZ)) == 0 | 580 | #if (TICK_NSEC % (NSEC_PER_SEC / USER_HZ)) == 0 |
581 | # if HZ < USER_HZ | 581 | # if HZ < USER_HZ |