Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752708AbbBCJAJ (ORCPT ); Tue, 3 Feb 2015 04:00:09 -0500 Received: from cantor2.suse.de ([195.135.220.15]:37371 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751570AbbBCJAD (ORCPT ); Tue, 3 Feb 2015 04:00:03 -0500 Date: Tue, 03 Feb 2015 10:00:01 +0100 Message-ID: From: Takashi Iwai To: Nicholas Mc Guire Cc: Jaroslav Kysela , Greg Kroah-Hartman , Chris Rorvick , Stefan Hajnoczi , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] ALSA: line6: use msecs_to_jiffies for conversion In-Reply-To: <1422949119-9306-1-git-send-email-hofrat@osadl.org> References: <1422949119-9306-1-git-send-email-hofrat@osadl.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/24.4 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") 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: 1577 Lines: 49 At Tue, 3 Feb 2015 02:38:39 -0500, Nicholas Mc Guire wrote: > > This is only an API consolidation and should make things more readable > it replaces var * HZ / 1000 by msecs_to_jiffies(var). > > > Signed-off-by: Nicholas Mc Guire > --- > > Converting milliseconds to jiffies by val * HZ / 1000 is technically > not wrong but msecs_to_jiffies(val) is the cleaner solution and handles > all corner cases correctly. This is a minor API cleanup only. > > Patch was only compile tested for x86_64_defconfig + CONFIG_SOUND=y, > CONFIG_SND_USB_POD=m (implies CONFIG_SND_USB_LINE6=y) > > Patch is against 3.0.19-rc6 (localversion = -next-20150202) Applied, thanks. Takashi > > sound/usb/line6/driver.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/sound/usb/line6/driver.c b/sound/usb/line6/driver.c > index 2328ec9..3cf12cc 100644 > --- a/sound/usb/line6/driver.c > +++ b/sound/usb/line6/driver.c > @@ -166,7 +166,7 @@ void line6_start_timer(struct timer_list *timer, unsigned int msecs, > void (*function)(unsigned long), unsigned long data) > { > setup_timer(timer, function, data); > - mod_timer(timer, jiffies + msecs * HZ / 1000); > + mod_timer(timer, jiffies + msecs_to_jiffies(msecs)); > } > EXPORT_SYMBOL_GPL(line6_start_timer); > > -- > 1.7.10.4 > -- 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/