lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Thu, 12 Mar 2015 11:24:15 -0700
From:	John Stultz <john.stultz@...aro.org>
To:	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
Cc:	lkml <linux-kernel@...r.kernel.org>,
	"David S. Miller" <davem@...emloft.net>,
	Arnd Bergmann <arnd@...db.de>, linux-ide@...r.kernel.org
Subject: Re: [PATCH] ide: pdc202xxx_new: Remove do_gettimeofday() usage for ktime_get

On Thu, Mar 12, 2015 at 11:16 AM, Sergei Shtylyov
<sergei.shtylyov@...entembedded.com> wrote:
> 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@...emloft.net>
>> Cc: Arnd Bergmann <arnd@...db.de>
>> Cc: linux-ide@...r.kernel.org
>> Signed-off-by: John Stultz <john.stultz@...aro.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.

Thanks for the review! Will fix in the next iteration.

thanks
-john
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ