Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760419AbYCZSHE (ORCPT ); Wed, 26 Mar 2008 14:07:04 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757956AbYCZSGv (ORCPT ); Wed, 26 Mar 2008 14:06:51 -0400 Received: from yw-out-2324.google.com ([74.125.46.29]:10262 "EHLO yw-out-2324.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757359AbYCZSGu (ORCPT ); Wed, 26 Mar 2008 14:06:50 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=NpjDxtHfNTWAho7kNr5jakPAkHC7zOZeVLouW3v7ItmLC8hUXc/Z83e40Hs3PJYBvCzlqfBgxV1erjtHdMCBPrOD4FsnIvWNygArIMT2QuPbG49n4xVmMhRxzAZUHPu50u/3QSvgysZhEgcLJi6VbKygy9D44Yc4qKzh23PRjKE= Message-ID: Date: Wed, 26 Mar 2008 14:06:49 -0400 From: "Mike Nuss" To: "Richard Kennedy" Subject: Re: ohci : strange looking use of round_jiffies_relative. possible bug ? Cc: "Alan Stern" , dbrownell@users.sourceforge.net, linux-usb , lkml In-Reply-To: <1206546405.2931.20.camel@castor.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1206546405.2931.20.camel@castor.localdomain> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1224 Lines: 32 On Wed, Mar 26, 2008 at 11:46 AM, Richard Kennedy wrote: > > 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 ;) Yes, my intent there was a roughly 1 second delay. You're correct, it's wrong. > > I'd say it's a bug. Or rather a pair of bugs, since that mod_timer() > > call appears in two places. Yup. Mike -- 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/