Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932386AbbBFM2B (ORCPT ); Fri, 6 Feb 2015 07:28:01 -0500 Received: from mail-la0-f47.google.com ([209.85.215.47]:46871 "EHLO mail-la0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932354AbbBFM16 (ORCPT ); Fri, 6 Feb 2015 07:27:58 -0500 Message-ID: <54D4B34B.7030408@cogentembedded.com> Date: Fri, 06 Feb 2015 15:27:55 +0300 From: Sergei Shtylyov User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Nicholas Mc Guire , Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] USB: image: use msecs_to_jiffies for time conversion References: <1423216221-29094-1-git-send-email-hofrat@osadl.org> In-Reply-To: <1423216221-29094-1-git-send-email-hofrat@osadl.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1678 Lines: 46 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 > --- > 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 -- 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/