mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: vbyravarasu@nvidia.com
Cc: pavel@ucw.cz, len.brown@intel.com, gregkh@suse.de,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	pdeschrijver@nvidia.com
Subject: Re: [PATCH v2] PM: fix runtime accounting calculation error
Date: Fri, 28 Oct 2011 13:51:38 +0200	[thread overview]
Message-ID: <201110281351.38664.rjw@sisk.pl> (raw)
In-Reply-To: <1319791502-17937-1-git-send-email-vbyravarasu@nvidia.com>

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>

Thanks, looks good.  I'll add it to the linux-pm tree's pm-fixes
branch when I'm back home later this week.

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


  reply	other threads:[~2011-10-28 11:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-28  8:45 vbyravarasu
2011-10-28 11:51 ` Rafael J. Wysocki [this message]
2011-11-03  0:18 ` Rafael J. Wysocki
2011-11-03  3:17   ` Venu Byravarasu

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=201110281351.38664.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=gregkh@suse.de \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=pdeschrijver@nvidia.com \
    --cc=vbyravarasu@nvidia.com \
    /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®