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 /include/linux/jiffies.h | |
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 'include/linux/jiffies.h')
-rw-r--r-- | include/linux/jiffies.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/jiffies.h b/include/linux/jiffies.h index f97672a36fa8..265e2c3cbd1c 100644 --- a/include/linux/jiffies.h +++ b/include/linux/jiffies.h | |||
@@ -303,7 +303,7 @@ extern void jiffies_to_timespec(const unsigned long jiffies, | |||
303 | extern unsigned long timeval_to_jiffies(const struct timeval *value); | 303 | extern unsigned long timeval_to_jiffies(const struct timeval *value); |
304 | extern void jiffies_to_timeval(const unsigned long jiffies, | 304 | extern void jiffies_to_timeval(const unsigned long jiffies, |
305 | struct timeval *value); | 305 | struct timeval *value); |
306 | extern clock_t jiffies_to_clock_t(long x); | 306 | extern clock_t jiffies_to_clock_t(unsigned long x); |
307 | extern unsigned long clock_t_to_jiffies(unsigned long x); | 307 | extern unsigned long clock_t_to_jiffies(unsigned long x); |
308 | extern u64 jiffies_64_to_clock_t(u64 x); | 308 | extern u64 jiffies_64_to_clock_t(u64 x); |
309 | extern u64 nsec_to_clock_t(u64 x); | 309 | extern u64 nsec_to_clock_t(u64 x); |