Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756762AbYCZPh6 (ORCPT ); Wed, 26 Mar 2008 11:37:58 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752684AbYCZPht (ORCPT ); Wed, 26 Mar 2008 11:37:49 -0400 Received: from iolanthe.rowland.org ([192.131.102.54]:52986 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1752604AbYCZPhs (ORCPT ); Wed, 26 Mar 2008 11:37:48 -0400 Date: Wed, 26 Mar 2008 11:37:47 -0400 (EDT) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: Richard Kennedy cc: dbrownell@users.sourceforge.net, linux-usb , lkml Subject: Re: ohci : strange looking use of round_jiffies_relative. possible bug ? In-Reply-To: <1206542289.2931.17.camel@castor.localdomain> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 930 Lines: 25 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/