From: Shuah Khan <skhan@linuxfoundation.org>
To: Jeffrin Jose T <jeffrin@rajagiritech.edu.in>,
Shuah Khan <shuah@kernel.org>
Cc: "open list:KERNEL SELFTEST FRAMEWORK"
<linux-kselftest@vger.kernel.org>,
lkml <linux-kernel@vger.kernel.org>,
Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: related to fixing depreciated api
Date: Tue, 15 Dec 2020 12:52:46 -0700 [thread overview]
Message-ID: <86388240-57df-977f-d0ac-47c2ed7df7a5@linuxfoundation.org> (raw)
In-Reply-To: <291555f8-ed17-5ed6-8ca4-42c8d5e13be9@linuxfoundation.org>
On 12/15/20 9:12 AM, Shuah Khan wrote:
> On 12/14/20 9:42 AM, Jeffrin Jose T wrote:
>> hello,
>>
>> i have worked on to fix depreciated api issue from
>> tools/testing/selftests/intel_pstate/aerf.c
>>
>> i met with the following error related...
>>
>> --------------x------------------x----------------->
>> $pwd
>> /home/jeffrin/UP/linux-kselftest/tools/testing/selftests/intel_pstate
>> $make
>> gcc -Wall -D_GNU_SOURCE aperf.c /home/jeffrin/UP/linux-
>> kselftest/tools/testing/selftests/kselftest_harness.h
>> /home/jeffrin/UP/linux-kselftest/tools/testing/selftests/kselftest.h -
>> lm -o /home/jeffrin/UP/linux-
>> kselftest/tools/testing/selftests/intel_pstate/aperf
>> aperf.c: In function ‘main’:
>> aperf.c:58:2: warning: ‘ftime’ is deprecated [-Wdeprecated-
>> declarations]
>> 58 | ftime(&before);
>> | ^~~~~
>> In file included from aperf.c:9:
>> /usr/include/x86_64-linux-gnu/sys/timeb.h:39:12: note: declared here
>> 39 | extern int ftime (struct timeb *__timebuf)
>> | ^~~~~
>> aperf.c:67:2: warning: ‘ftime’ is deprecated [-Wdeprecated-
>> declarations]
>> 67 | ftime(&after);
>> | ^~~~~
>> In file included from aperf.c:9:
>> /usr/include/x86_64-linux-gnu/sys/timeb.h:39:12: note: declared here
>> 39 | extern int ftime (struct timeb *__timebuf)
>> | ^~~~~
>> $
>> ----------------x---------------x---------------------->
>>
>>
>> from ftime manual i found that it is depreciated...
>>
>> This function is deprecated, and will be removed in a future version
>> of the GNU C library. Use clock_gettime(2) instead.
>>
>>
>> now clock_gettime gives new data structure.
>>
>> struct timespec {
>> time_t tv_sec; /* seconds */
>> long tv_nsec; /* nanoseconds */
>> };
>>
>>
>> i worked on with the new data structure and some errors that came
>> along.
>> typical final output looks good but values of runtime and typical
>> frequency
>> does not look normal during "sudo bash run.sh".
>>
>> output of "git diff" and a portion of output of "sudo bash run.sh".
>> is attached.
>>
>
> Please send a proper patch to fix intel_pstate to use clock_gettime.
>
The fix for this is already in next - no need to send patch.
thanks,
-- Shuah
next prev parent reply other threads:[~2020-12-15 19:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-14 16:42 related to fixing depreciated api Jeffrin Jose T
2020-12-15 13:05 ` [WARNING ]Re: " Jeffrin Thalakkottoor
2020-12-15 16:12 ` Shuah Khan
2020-12-15 19:52 ` Shuah Khan [this message]
2020-12-15 23:02 ` Jeffrin Jose T
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=86388240-57df-977f-d0ac-47c2ed7df7a5@linuxfoundation.org \
--to=skhan@linuxfoundation.org \
--cc=jeffrin@rajagiritech.edu.in \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=shuah@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