From: David Howells <dhowells@redhat.com>
To: rjw@sisk.pl, akpm@linux-foundation.org
Cc: dhowells@redhat.com, pavel@ucw.cz, linux-kernel@vger.kernel.org
Subject: [PATCH] Fix try_to_freeze_tasks()'s use of do_div()
Date: Fri, 11 Jul 2008 14:21:46 +0100 [thread overview]
Message-ID: <20080711132146.31912.76254.stgit@warthog.procyon.org.uk> (raw)
Fix try_to_freeze_tasks()'s use of do_div() on an s64 by making elapsed_csecs64
a u64 instead and dividing that.
Possibly this should be guarded lest the interval calculation turn up negative,
but the possible negativity of the result of the division is cast away anyway.
This was introduced by patch 438e2ce68dfd4af4cfcec2f873564fb921db4bb5.
Signed-off-by: David Howells <dhowells@redhat.com>
---
kernel/power/process.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kernel/power/process.c b/kernel/power/process.c
index 5fb8765..278946a 100644
--- a/kernel/power/process.c
+++ b/kernel/power/process.c
@@ -149,7 +149,7 @@ static int try_to_freeze_tasks(bool sig_only)
unsigned long end_time;
unsigned int todo;
struct timeval start, end;
- s64 elapsed_csecs64;
+ u64 elapsed_csecs64;
unsigned int elapsed_csecs;
do_gettimeofday(&start);
next reply other threads:[~2008-07-11 13:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-11 13:21 David Howells [this message]
2008-07-11 15:05 ` Rafael J. Wysocki
2008-07-11 17:59 ` Pavel Machek
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=20080711132146.31912.76254.stgit@warthog.procyon.org.uk \
--to=dhowells@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=rjw@sisk.pl \
/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
all inboxes | Powered by JetHome®