public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* ohci : strange looking use of round_jiffies_relative. possible bug ?
@ 2008-03-26 14:38 Richard Kennedy
  2008-03-26 15:37 ` Alan Stern
  0 siblings, 1 reply; 7+ messages in thread
From: Richard Kennedy @ 2008-03-26 14:38 UTC (permalink / raw)
  To: dbrownell; +Cc: linux-usb, lkml

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


Cheers
Richard




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-03-27 19:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-26 14:38 ohci : strange looking use of round_jiffies_relative. possible bug ? Richard Kennedy
2008-03-26 15:37 ` Alan Stern
2008-03-26 15:46   ` Richard Kennedy
2008-03-26 18:06     ` Mike Nuss
2008-03-27 18:55       ` David Brownell
2008-03-26 16:32   ` [patch] usb ohci : fix 2 timers to fire at jiffies + 1s Richard Kennedy
2008-03-27 18:53     ` David Brownell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox