lkml.org 
[lkml]   [2011]   [Nov]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v2] PM: fix runtime accounting calculation error
Date
On Friday, October 28, 2011, vbyravarasu@nvidia.com wrote:
> From: venu byravarasu <vbyravarasu@nvidia.com>
>
> With delta type being int, its value is made zero
> for all values of now > 0x80000000.
> Hence fixing it.
>
> Signed-off-by: venu byravarasu <vbyravarasu@nvidia.com>

Applied to linux-pm/linux-next.

Thanks,
Rafael


> ---
> changes since v1:
> Removed max_num and its usage references.
> ..........
>
> drivers/base/power/runtime.c | 5 +----
> 1 files changed, 1 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/base/power/runtime.c b/drivers/base/power/runtime.c
> index 1079e03..e8a5172 100644
> --- a/drivers/base/power/runtime.c
> +++ b/drivers/base/power/runtime.c
> @@ -30,13 +30,10 @@ static int rpm_suspend(struct device *dev, int rpmflags);
> void update_pm_runtime_accounting(struct device *dev)
> {
> unsigned long now = jiffies;
> - int delta;
> + unsigned long delta;
>
> delta = now - dev->power.accounting_timestamp;
>
> - if (delta < 0)
> - delta = 0;
> -
> dev->power.accounting_timestamp = now;
>
> if (dev->power.disable_depth > 0)
>



\
 
 \ /
  Last update: 2011-11-03 01:19    [W:0.037 / U:2.032 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site