lkml.org 
[lkml]   [2011]   [Oct]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRE: [PATCH] PM: fix calculation mistake in roll-over cases
> -----Original Message-----
> From: Alan Stern [mailto:stern@rowland.harvard.edu]
> Sent: Friday, October 28, 2011 12:00 AM
> To: Venu Byravarasu
> Cc: Rafael J. Wysocki; pavel@ucw.cz; len.brown@intel.com; gregkh@suse.de;
> linux-pm@vger.kernel.org; linux-kernel@vger.kernel.org; Peter De Schrijver
> Subject: RE: [PATCH] PM: fix calculation mistake in roll-over cases
>
> On Thu, 27 Oct 2011, Venu Byravarasu wrote:
>
> > > From: venu byravarasu <vbyravarasu@nvidia.com>
> > >
> > > In case of jiffies roll over, delta is made zero.
> > > Hence fixing it, after taking roll over into consideration.
> > >
> > > Signed-off-by: venu byravarasu <vbyravarasu@nvidia.com>
> > > ---
>
> > 2. Even if delta is made unsigned, in cases of jiffies roll over, delta will be zero.
> > That is also being taken care with the code added as part of if condition.
>
> Since delta is now unsigned, the "if (delta < 0)" test can never
> succeed. Therefore it can be removed.
>
> The new lines you added with max_num don't seem to serve any useful
> purpose. All they do is recalculate the same value that delta had
> before, but with an off-by-one error.
>
Agree with you Alan.
Will remove max_num references and upload the change.

Thanks,
Venu


\
 
 \ /
  Last update: 2011-10-28 08:37    [W:0.060 / U:1.528 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site