Subject: Re: [PATCH] Fix build errors on 32bit platforms with new ktime

From: Eric Dumazet <[email-masked]>
Date: Wed, 25 Apr 2007 00:12:38 +0200

Stephen Hemminger a écrit :
> On Wed, 25 Apr 2007 06:55:39 +0900 (JST)
> YOSHIFUJI Hideaki / 吉藤英明  <[email-masked]> wrote:
> 
>> In article <[email-masked]> (at Tue, 24 Apr 2007 10:04:20 -0700), Stephen Hemminger <[email-masked]> says:
>>
>>> Yoshifuji-san had the right idea, but ktime_to_us needs to be defined
>>> in a way that works on both 64 and 32bit platforms.
>> No, this does not cure.
>>>  
>>> +#define ktime_to_us(kt)			((kt).tv64 / NSEC_PER_SEC)
>>> +
>> NSEC_PER_USEC?
> 
> On 64 bit platforms, ktime stores nano-seconds in a 64 bit value, so
> this is correct.

Really ? You introduce a 10^6 error and say it's correct ?

We believe the correct divisor is 10^3 to get usec from nsec, not 10^9