From patchwork Tue Feb 3 07:38:39 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Mc Guire X-Patchwork-Id: 5769261 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 4B649BF440 for ; Tue, 3 Feb 2015 15:15:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A048F200E3 for ; Tue, 3 Feb 2015 15:14:57 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id DDE0A2022D for ; Tue, 3 Feb 2015 15:14:52 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 0F566261622; Tue, 3 Feb 2015 16:14:52 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NO_DNS_FOR_FROM, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id B6BB826047C; Tue, 3 Feb 2015 16:14:08 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id DC14726085B; Tue, 3 Feb 2015 08:42:53 +0100 (CET) Received: from www.osadl.org (www.osadl.org [62.245.132.105]) by alsa0.perex.cz (Postfix) with ESMTP id 1AAB52607E9 for ; Tue, 3 Feb 2015 08:42:48 +0100 (CET) Received: from debian.hofrr.at (92-243-35-153.adsl.nanet.at [92.243.35.153] (may be forged)) by www.osadl.org (8.13.8/8.13.8/OSADL-2007092901) with ESMTP id t137gf1l000411; Tue, 3 Feb 2015 08:42:42 +0100 From: Nicholas Mc Guire To: Jaroslav Kysela Date: Tue, 3 Feb 2015 02:38:39 -0500 Message-Id: <1422949119-9306-1-git-send-email-hofrat@osadl.org> X-Mailer: git-send-email 1.7.10.4 X-Mailman-Approved-At: Tue, 03 Feb 2015 16:14:08 +0100 Cc: alsa-devel@alsa-project.org, Chris Rorvick , Takashi Iwai , Greg Kroah-Hartman , Nicholas Mc Guire , linux-kernel@vger.kernel.org, Stefan Hajnoczi Subject: [alsa-devel] [PATCH 1/2] ALSA: line6: use msecs_to_jiffies for conversion X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP 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) 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);