From: Takashi Iwai <tiwai@suse.de>
To: Nicholas Mc Guire <hofrat@osadl.org>
Cc: Jaroslav Kysela <perex@perex.cz>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Chris Rorvick <chris@rorvick.com>,
Stefan Hajnoczi <stefanha@gmail.com>,
alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] ALSA: line6: use msecs_to_jiffies for conversion
Date: Tue, 03 Feb 2015 10:00:01 +0100 [thread overview]
Message-ID: <s5hoapbe5f2.wl-tiwai@suse.de> (raw)
In-Reply-To: <1422949119-9306-1-git-send-email-hofrat@osadl.org>
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 <hofrat@osadl.org>
> ---
>
> 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
>
prev parent reply other threads:[~2015-02-03 9:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-03 7:38 Nicholas Mc Guire
2015-02-03 9:00 ` Takashi Iwai [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=s5hoapbe5f2.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=chris@rorvick.com \
--cc=gregkh@linuxfoundation.org \
--cc=hofrat@osadl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=stefanha@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®