]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
The parameter's origin type is long. On an i386 architecture, it can
authorhank <pyu@redhat.com>
Tue, 26 Jul 2011 10:14:35 +0000 (20:14 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 29 Jul 2011 05:46:03 +0000 (15:46 +1000)
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: Thomas Gleixner <tglx@linutronix.de>
Cc: John Stultz <john.stultz@linaro.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
kernel/time.c

index 58636b7ee5e0245369e07be90c2d423a33124536..73e416db0a1e6b23205cc416864ea2c91b9d26d0 100644 (file)
@@ -575,7 +575,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