summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorhank <pyu@redhat.com>2011-09-20 13:53:39 -0700
committerPaul Gortmaker <paul.gortmaker@windriver.com>2012-08-17 15:35:33 -0400
commita019e7998fd21183e82409f8bf35ec0fc9b994e7 (patch)
treed03e0a40b33c25004c488fc3e86bed236f0905f7 /kernel
parent76bd0e219681e554f59988d6af3eaf21202809b0 (diff)
time: Change jiffies_to_clock_t() argument type to unsigned long
commit cbbc719fccdb8cbd87350a05c0d33167c9b79365 upstream. 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> [ 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> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/time.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/time.c b/kernel/time.c
index 656dccfe1cbb..82e83b0b0007 100644
--- a/kernel/time.c
+++ b/kernel/time.c
@@ -592,7 +592,7 @@ EXPORT_SYMBOL(jiffies_to_timeval);
/*
* Convert jiffies/jiffies_64 to clock_t and back.
*/
-clock_t jiffies_to_clock_t(long x)
+clock_t jiffies_to_clock_t(unsigned long x)
{
#if (TICK_NSEC % (NSEC_PER_SEC / USER_HZ)) == 0
# if HZ < USER_HZ