lkml.org 
[lkml]   [2008]   [Jul]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] Fix try_to_freeze_tasks()'s use of do_div()
Date
On Friday, 11 of July 2008, David Howells wrote:
> 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>

Acked-by: Rafael J. Wysocki <rjw@sisk.pl>

> ---
>
> 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);
>
>
>




\
 
 \ /
  Last update: 2008-07-11 17:05    [W:0.039 / U:0.888 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site