From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753702AbcK1RcY (ORCPT ); Mon, 28 Nov 2016 12:32:24 -0500 Received: from mail-pg0-f65.google.com ([74.125.83.65]:35099 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752668AbcK1RbR (ORCPT ); Mon, 28 Nov 2016 12:31:17 -0500 Subject: Re: [PATCH 2/6] perf tool: Move parse_nsec_time to time-utils.c To: Jiri Olsa , David Ahern References: <1480109999-36971-1-git-send-email-dsa@cumulusnetworks.com> <1480109999-36971-3-git-send-email-dsa@cumulusnetworks.com> <20161128135826.GA1928@krava> Cc: acme@kernel.org, mingo@kernel.org, peterz@infradead.org, namhyung@kernel.org, jolsa@kernel.org, linux-kernel@vger.kernel.org From: David Ahern Message-ID: <8239a06e-df1e-84cc-ec3c-3fdd22c3fe0a@gmail.com> Date: Mon, 28 Nov 2016 10:31:14 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.5.0 MIME-Version: 1.0 In-Reply-To: <20161128135826.GA1928@krava> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/28/16 6:58 AM, Jiri Olsa wrote: >> diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h >> index 79662d67891e..1d639e38aa82 100644 >> --- a/tools/perf/util/util.h >> +++ b/tools/perf/util/util.h >> @@ -179,8 +179,6 @@ static inline void *zalloc(size_t size) >> #undef tolower >> #undef toupper >> >> -int parse_nsec_time(const char *str, u64 *ptime); > > strange, can't see any current user of this function other than in your patch Added a few years back. I switched my code to it at that point. odd that there are no other users, but it has worked for me since it was added. > > could you please also add some automated tests for this function? Why? It is basically a fancy wrapper around strtoul for sec.usec strings.