lkml.org 
[lkml]   [2008]   [Mar]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: ohci : strange looking use of round_jiffies_relative. possible bug ?
From
Date

On Wed, 2008-03-26 at 11:37 -0400, Alan Stern wrote:
> On Wed, 26 Mar 2008, Richard Kennedy wrote:
>
> > I was looking at the uses of round_jiffies and noticed that the ohci
> > unlink_watchdog_func() calls
> > mod_timer(&ohci->unlink_watchdog, round_jiffies_relative(HZ));
> >
> > Which looks a bit strange as it will set the timer to 0 <= t < HZ.
> > Reading the comments I think that is really is expecting to setup timer
> > to (now + 1s)
> >
> > mod_timer(&ohci->unlink_watchdog, round_jiffies(jiffies + HZ));
> >
> > If this is not true then perhaps it needs a comment to explain what it
> > _is_ trying to do, because it's got me baffled ;)
>
> I'd say it's a bug. Or rather a pair of bugs, since that mod_timer()
> call appears in two places.
>
> Alan Stern
>
Thanks. In that case I'll post a patch.
Richard



\
 
 \ /
  Last update: 2008-03-26 16:49    [W:0.053 / U:0.400 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site