From: hank <pyu@redhat.com>
To: johnstul@us.ibm.com, tglx@linutronix.de
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 1/1] Change jiffies_to_clock_t function input parameter's, type to unsigned long
Date: Wed, 29 Jun 2011 13:44:15 +0800 [thread overview]
Message-ID: <4E0ABBAF.3020200@redhat.com> (raw)
>From dbc32d224ca024a98b2521a8a7bf20989bec34ee Mon Sep 17 00:00:00 2001
From: hank <pyu@redhat.com>
Date: Wed, 29 Jun 2011 09:17:45 +0800
Subject: [PATCH 1/1] Change jiffies_to_clock_t function input parameter's
type to unsigned long
The parmaeter's origin type is long. On an i386 architecture, it can easily
larger than 0x80000000, then this function convert it to a u64 type, get a
result: 0xffffffff80000000, it is unexpected, so change the type to
unsigned long, we can get the correct result: 0x0000000080000000
Signed-off-by: hank <pyu@redhat.com>
---
kernel/time.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kernel/time.c b/kernel/time.c
index 8e8dc6d..d776062 100644
--- a/kernel/time.c
+++ b/kernel/time.c
@@ -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
--
1.7.4.4
reply other threads:[~2011-06-29 5:44 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E0ABBAF.3020200@redhat.com \
--to=pyu@redhat.com \
--cc=johnstul@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox