public inbox for linux-kselftest@vger.kernel.org
 help / color / mirror / Atom feed
From: Shuah Khan <skhan@linuxfoundation.org>
To: "Rantala,
	Tommi T. (Nokia - FI/Espoo)" <tommi.t.rantala@nokia.com>,
	"shuah@kernel.org" <shuah@kernel.org>,
	"linux-kselftest@vger.kernel.org"
	<linux-kselftest@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [PATCH] selftests: intel_pstate: ftime() is deprecated
Date: Wed, 28 Oct 2020 09:06:09 -0600	[thread overview]
Message-ID: <459bc6a0-8046-e223-f88e-10e643a36dd7@linuxfoundation.org> (raw)
In-Reply-To: <d4adb97b3325ac93295d5e42dc07e8381fb9efab.camel@nokia.com>

On 10/28/20 1:36 AM, Rantala, Tommi T. (Nokia - FI/Espoo) wrote:
> On Tue, 2020-10-27 at 14:08 -0600, Shuah Khan wrote:
>>
>>> @@ -73,8 +80,8 @@ int main(int argc, char **argv) {
>>>    	aperf = new_aperf-old_aperf;
>>>    	mperf = new_mperf-old_mperf;
>>>    
>>> -	start = before.time*1000 + before.millitm;
>>> -	finish = after.time*1000 + after.millitm;
>>> +	start = before.tv_sec*1000 + before.tv_nsec/1000000L;
>>> +	finish = after.tv_sec*1000 + after.tv_nsec/1000000L;
>>
>> Why not use timespec dNSEC_PER_MSEC define from  include/vdso/time64.h?
> 
> Hi,
> 
> If the define was available in the UAPI headers, then certainly would make
> sense to use it. But I would not mess with the kernel internal headers here.

Suggested the wrong file while looking up the define. I was thinking
linux/time64.h

However it isn't part of headers_install, so can't use that one.

Considering the number of places NSEC_PER_MSEC is hard coded
and defined in headers e.g: tools/include/linux/time64.h, probably
should be included in timespec block in time.h

Not something to worry about for this patch. Please add a NSEC_PER_MSEC
define for now in this file.

thanks,
-- Shuah







      reply	other threads:[~2020-10-29  1:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-16 13:22 [PATCH] selftests: intel_pstate: ftime() is deprecated Tommi Rantala
2020-10-27 20:08 ` Shuah Khan
2020-10-28  7:36   ` Rantala, Tommi T. (Nokia - FI/Espoo)
2020-10-28 15:06     ` Shuah Khan [this message]

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=459bc6a0-8046-e223-f88e-10e643a36dd7@linuxfoundation.org \
    --to=skhan@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=shuah@kernel.org \
    --cc=tommi.t.rantala@nokia.com \
    /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