Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp888856pxb; Wed, 27 Oct 2021 14:31:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzoRl1OVlCsiJ6E9q3u0JCB5wfBG2dqrtm3n/5PhBnH3fu6df3nRuHLaFoHxI7y/zg3277S X-Received: by 2002:a17:902:d508:b0:140:42ce:c7b1 with SMTP id b8-20020a170902d50800b0014042cec7b1mr210468plg.89.1635370159132; Wed, 27 Oct 2021 14:29:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635370159; cv=none; d=google.com; s=arc-20160816; b=EOyTzj1RIJCGKXWswuC+QxcBPGMaC3vdvlklY4Vz7dBpqC9Ggg5FgC3H+fU7g6SXVi J7D6MAphsSSuxvg9bF+iLpFBxr+7lUksQDVr9T6d7ZoWxZdXdMDrpDNyI5DP97Ar0XJG VadFAOdsUOmrqrN634yaRzxWKDQPhV9QJY5/cdELQJu3Qxnh+rI4gQuXisJ6sQ3vUIw0 c7szLoE1RD4xVBTr+ov8lBNPjc9kJG2TExNxmD0sq8Sga4ZVTLCh07euxyBfGGNiQgEO TYeuUzcAL3NtPvjxFLSqZ777Ve4hFJ+liWFVQVgDwkvBijdpepZdqBsqPzAZLE54Lamc ejCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=MYj0+ML0ac8wqv3sUCPUKJ0SwfUjjKNhjavzSdlRlYc=; b=ACXfsOUD/glfMH17WirETrnDy2eXDFO0Qr1dKBBWndGiJaiQ//yDSlaLtncsv8Mp82 8ISfq08H49HkY+efd/klwxxHGznOkTqPDZ2CrtVhkNk2e67qm71a3Dod4aF8n+DFAHUT 1dlx0FIg2FgtKzrvWu1v4hrbS+yYaCdRI0KvEW8rBnYPSeJHHL4SsCFL0hu7Wf8YsgFW okCzSe5T/W5/F6EVjGCmWNjMUdHHrIpZQeHnssdKAODWWwO6PlgaxoY+nnt4xw3lAu+/ wippBxvfgBTVpzdwHXic0R2ZZKiwAuuJDv0ohGCZSH0LMpRSuZLbHLloYw7XwoqEGkjJ egmQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id mi11si7750552pjb.26.2021.10.27.14.29.07; Wed, 27 Oct 2021 14:29:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236865AbhJ0Q1L (ORCPT + 97 others); Wed, 27 Oct 2021 12:27:11 -0400 Received: from gateway33.websitewelcome.com ([192.185.146.82]:42390 "EHLO gateway33.websitewelcome.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234414AbhJ0Q1L (ORCPT ); Wed, 27 Oct 2021 12:27:11 -0400 Received: from cm13.websitewelcome.com (cm13.websitewelcome.com [100.42.49.6]) by gateway33.websitewelcome.com (Postfix) with ESMTP id 6AC0F2FC0B for ; Wed, 27 Oct 2021 11:24:10 -0500 (CDT) Received: from gator4132.hostgator.com ([192.185.4.144]) by cmsmtp with SMTP id flikmrRj9G0jLflikmwSvv; Wed, 27 Oct 2021 11:24:10 -0500 X-Authority-Reason: nr=8 Received: from host-79-18-63-114.retail.telecomitalia.it ([79.18.63.114]:46382 helo=[10.0.0.43]) by gator4132.hostgator.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1mflii-001LYj-Vg; Wed, 27 Oct 2021 11:24:09 -0500 Message-ID: <575a2d6b-9e37-5566-9343-e77e4f4e8c1f@kernel.org> Date: Wed, 27 Oct 2021 18:24:01 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 Subject: Re: [PATCH V6 08/20] rtla: Helper functions for rtla Content-Language: en-US To: Tao Zhou , Steven Rostedt Cc: Ingo Molnar , Tom Zanussi , Masami Hiramatsu , Juri Lelli , Clark Williams , John Kacur , Peter Zijlstra , Thomas Gleixner , Sebastian Andrzej Siewior , linux-rt-users@vger.kernel.org, linux-trace-devel@vger.kernel.org, linux-kernel@vger.kernel.org References: <183637700a31169e5d6d1c8a827c5365599ec806.1635284863.git.bristot@kernel.org> From: Daniel Bristot de Oliveira In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator4132.hostgator.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - kernel.org X-BWhitelist: no X-Source-IP: 79.18.63.114 X-Source-L: No X-Exim-ID: 1mflii-001LYj-Vg X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: host-79-18-63-114.retail.telecomitalia.it ([10.0.0.43]) [79.18.63.114]:46382 X-Source-Auth: kernel@bristot.me X-Email-Count: 1 X-Source-Cap: YnJpc3RvdG1lO2JyaXN0b3RtZTtnYXRvcjQxMzIuaG9zdGdhdG9yLmNvbQ== X-Local-Domain: no Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/27/21 16:02, Tao Zhou wrote: >> +/* >> + * parse_ns_duration - parse duration with ns/us/ms/s converting it to nanoseconds >> + */ >> +long parse_ns_duration(char *val) >> +{ >> + char *end; >> + long t; >> + >> + t = strtol(val, &end, 10); >> + >> + if (end) { >> + if (!strncmp(end, "ns", 2)) { >> + return t; >> + } else if (!strncmp(end, "us", 2)) { >> + t *= 1000; >> + return t; >> + } else if (!strncmp(end, "ms", 2)) { >> + t *= 1000 * 1000; >> + return t; >> + } else if (!strncmp(end, "s", 1)) { >> + t *= 1000 * 1000 * 100; > ^^^ > Ah, 1000 not 100. yep, I will fix that. Thanks! Steven, I am tempted to start placing fixes patches on top of this series. What do you think? -- Daniel