From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933002AbcK1N6j (ORCPT ); Mon, 28 Nov 2016 08:58:39 -0500 Received: from mx1.redhat.com ([209.132.183.28]:40454 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932283AbcK1N63 (ORCPT ); Mon, 28 Nov 2016 08:58:29 -0500 Date: Mon, 28 Nov 2016 14:58:26 +0100 From: Jiri Olsa To: David Ahern Cc: acme@kernel.org, mingo@kernel.org, peterz@infradead.org, namhyung@kernel.org, jolsa@kernel.org, linux-kernel@vger.kernel.org, David Ahern Subject: Re: [PATCH 2/6] perf tool: Move parse_nsec_time to time-utils.c Message-ID: <20161128135826.GA1928@krava> References: <1480109999-36971-1-git-send-email-dsa@cumulusnetworks.com> <1480109999-36971-3-git-send-email-dsa@cumulusnetworks.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1480109999-36971-3-git-send-email-dsa@cumulusnetworks.com> User-Agent: Mutt/1.7.1 (2016-10-04) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Mon, 28 Nov 2016 13:58:29 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 25, 2016 at 02:39:55PM -0700, David Ahern wrote: SNIP > - > - time_nsec = strtoul(nsec_buf, &end, 10); > - if (*end != '\0') > - return -1; > - } else > - time_nsec = 0; > - > - *ptime = time_sec * NSEC_PER_SEC + time_nsec; > - return 0; > -} > - > int timestamp__scnprintf_usec(u64 timestamp, char *buf, size_t sz) > { > u64 sec = timestamp / NSEC_PER_SEC; > 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 could you please also add some automated tests for this function? thanks, jirka