From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 29CEAC2BB48 for ; Tue, 15 Dec 2020 19:53:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CB86722A99 for ; Tue, 15 Dec 2020 19:53:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727197AbgLOTx3 (ORCPT ); Tue, 15 Dec 2020 14:53:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36016 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725850AbgLOTx2 (ORCPT ); Tue, 15 Dec 2020 14:53:28 -0500 Received: from mail-io1-xd42.google.com (mail-io1-xd42.google.com [IPv6:2607:f8b0:4864:20::d42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7CB7EC0617A6 for ; Tue, 15 Dec 2020 11:52:48 -0800 (PST) Received: by mail-io1-xd42.google.com with SMTP id y5so21698698iow.5 for ; Tue, 15 Dec 2020 11:52:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=YfQsmfSayLw6R8VzNs6qO72MJ4kq6ZC9UvyADxPXlEw=; b=MMEaV+dA7AusmEfJAHKgL5le68VNqcPr2F6wGpaYcelxqSeYWg9HsmcOdAQ8wATR3F rSLkW9yVw1SQiF3A/ayl/4OAwfPZHwB0iLSJQPvAdNrTJVkHKpRzEDm0M1YzSDpQsKtF 7ixBG+KWK+tERgiMKe9nygNLK8uwcpFTCzDnY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=YfQsmfSayLw6R8VzNs6qO72MJ4kq6ZC9UvyADxPXlEw=; b=J2K+yBiLXz40b76Egq1ZEfzIj1MugNwaO9skPTG/tEwngP4fbF1sHMfQ/m+U8m9KmA 2wQMSnPpuzVJwGW8LCOjEtr3kQcgT1j2oTXXYCb5WpUHIgiJlzak628w2jCKn00ATtpk aWHSYajz4f8mnTmoWXWxQU4EH6n+7Lu+QNbRO3YVHbIi3x5/vcwKghQKSVCor6Qpj2HX 3dxq0Aktx87lStwI1CYxp0Lum7Ac2t8iY91uOQC3cwhyE+U58NVEoQPyt/Bqj0DlY4qV RzfvufKmJbULi1WyXeB94LOsP6UlgNMGn444u6XOVd3rOo+ooz8CBOKN3CklXa8Y5paG KfHQ== X-Gm-Message-State: AOAM5318L+TvK87NrzGeyBKCaY+y5pOg5+RBd9OCjvrIie2PnOPAMxbh p5u6j7n+RMjyDH1G2r6dFO+5Ug== X-Google-Smtp-Source: ABdhPJwvNpZZ7hhLeNjk5odYSJEoN52laDWgLTfGfVHlXVrPvfPT/THfdCPlkMIi7tQhD+zQFm3EZA== X-Received: by 2002:a6b:6f07:: with SMTP id k7mr4435645ioc.48.1608061967694; Tue, 15 Dec 2020 11:52:47 -0800 (PST) Received: from [192.168.1.112] (c-24-9-64-241.hsd1.co.comcast.net. [24.9.64.241]) by smtp.gmail.com with ESMTPSA id z10sm11216140ioi.47.2020.12.15.11.52.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 15 Dec 2020 11:52:46 -0800 (PST) Subject: Re: related to fixing depreciated api To: Jeffrin Jose T , Shuah Khan Cc: "open list:KERNEL SELFTEST FRAMEWORK" , lkml , Shuah Khan References: <291555f8-ed17-5ed6-8ca4-42c8d5e13be9@linuxfoundation.org> From: Shuah Khan Message-ID: <86388240-57df-977f-d0ac-47c2ed7df7a5@linuxfoundation.org> Date: Tue, 15 Dec 2020 12:52:46 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: <291555f8-ed17-5ed6-8ca4-42c8d5e13be9@linuxfoundation.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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