public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Nicholas Mc Guire <hofrat@osadl.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] USB: image: use msecs_to_jiffies for time conversion
Date: Fri, 06 Feb 2015 15:27:55 +0300	[thread overview]
Message-ID: <54D4B34B.7030408@cogentembedded.com> (raw)
In-Reply-To: <1423216221-29094-1-git-send-email-hofrat@osadl.org>

Hello.

On 2/6/2015 12:50 PM, 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>
> ---

> Note that the indentation is not aligned with the correct ( here due to
> lines going over 80 char - not sure if this is the right way to resolve
> this (this file has quite a few coding style issues).

> Patch was only compile tested with x86_64_defconfig + CONFIG_USB_MDC800=m

> Patch is against 3.19.0-rc7 (localversion-next is -next-20150204)

>   drivers/usb/image/mdc800.c |   11 +++++++----
>   1 file changed, 7 insertions(+), 4 deletions(-)

> diff --git a/drivers/usb/image/mdc800.c b/drivers/usb/image/mdc800.c
> index a62865a..3a72e8f 100644
> --- a/drivers/usb/image/mdc800.c
> +++ b/drivers/usb/image/mdc800.c
[...]
> @@ -743,8 +744,9 @@ static ssize_t mdc800_device_read (struct file *file, char __user *buf, size_t l
>   					mutex_unlock(&mdc800->io_lock);
>   					return len-left;
>   				}
> -				wait_event_timeout(mdc800->download_wait, mdc800->downloaded,
> -										TO_DOWNLOAD_GET_READY*HZ/1000);
> +				wait_event_timeout(mdc800->download_wait,
> +				     mdc800->downloaded,
> +				     msecs_to_jiffies(TO_DOWNLOAD_GET_READY));

    Don't indent with spaces (you're not aligning to open paren anyway), use 
the final tab instead, please.

WBR, Sergei


  reply	other threads:[~2015-02-06 12:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-06  9:50 [PATCH] USB: image: use msecs_to_jiffies for time conversion Nicholas Mc Guire
2015-02-06 12:27 ` Sergei Shtylyov [this message]
2015-02-06 13:36   ` Nicholas Mc Guire
2015-02-06 13:43     ` Sergei Shtylyov

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=54D4B34B.7030408@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hofrat@osadl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    /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