From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: John Stultz <john.stultz@linaro.org>,
lkml <linux-kernel@vger.kernel.org>
Cc: "David S. Miller" <davem@davemloft.net>,
Arnd Bergmann <arnd@arndb.de>,
linux-ide@vger.kernel.org
Subject: Re: [PATCH] ide: pdc202xxx_new: Remove do_gettimeofday() usage for ktime_get
Date: Thu, 12 Mar 2015 21:16:07 +0300 [thread overview]
Message-ID: <5501D7E7.6040603@cogentembedded.com> (raw)
In-Reply-To: <1426181032-2397-1-git-send-email-john.stultz@linaro.org>
Hello.
On 03/12/2015 08:23 PM, John Stultz wrote:
> As part of the y2038 cleanups, this patch removes the do_gettimeofday
> usage replacing it with ktime_get.
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: Arnd Bergmann <arnd@arndb.de>
> Cc: linux-ide@vger.kernel.org
> Signed-off-by: John Stultz <john.stultz@linaro.org>
> ---
> drivers/ide/pdc202xx_new.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
> diff --git a/drivers/ide/pdc202xx_new.c b/drivers/ide/pdc202xx_new.c
> index df73cbd..94bd05f 100644
> --- a/drivers/ide/pdc202xx_new.c
> +++ b/drivers/ide/pdc202xx_new.c
[...]
> @@ -273,8 +274,7 @@ static long detect_pll_input_clock(unsigned long dma_base)
> * Calculate the input clock in Hz
> * (the clock counter is 30 bit wide and counts down)
> */
> - usec_elapsed = (end_time.tv_sec - start_time.tv_sec) * 1000000 +
> - (end_time.tv_usec - start_time.tv_usec);
> + usec_elapsed = (long)ktime_to_ns(ktime_sub(end_time, start_time))/1000;
Please add spaces around / to be consistent with this file's (and general
kernel) coding style.
> pll_input = ((start_count - end_count) & 0x3fffffff) / 10 *
> (10000000 / usec_elapsed);
>
MBR, Sergei
next prev parent reply other threads:[~2015-03-12 18:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-12 17:23 [PATCH] ide: pdc202xxx_new: Remove do_gettimeofday() usage for ktime_get John Stultz
2015-03-12 18:16 ` Sergei Shtylyov [this message]
2015-03-12 18:24 ` John Stultz
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=5501D7E7.6040603@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=arnd@arndb.de \
--cc=davem@davemloft.net \
--cc=john.stultz@linaro.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@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