Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp884686pxb; Wed, 27 Oct 2021 14:27:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw0JnBgI2OfBuDmodXRBa3cNCmAlsv4vdNiTeMD5o5W4ZnqHjPCeEBgDF27Sw27u3HPELE9 X-Received: by 2002:a63:618d:: with SMTP id v135mr180285pgb.79.1635370021259; Wed, 27 Oct 2021 14:27:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635370021; cv=none; d=google.com; s=arc-20160816; b=M8yjLPna5dsb5gtelhzfAgw+bZhW6iNSLpVlovHV2yKl7apDJnlzCy5/Ckhbxhf95x vrbas/6xTJjEoV2nzDfhK4dIGy1jfc9g888QmHLPxdcSf9Zs8Fl7QVNhrA3Ix3ZM/xoZ xg+WiJtF8HGC7mXQqvu7Pm08h4AJSgBTXC2iMTVaJl1wwLTYJtIiMTqVRx83+9Cbi6Wf 2pobyeOCBQPejAqUOV5QSKYkypN9gxEF3h4UQiIihO4lKslUfSy27rPg6YuD6KkjWyHs bGpJuwUEpM6XcixoGm2wi8m+vs0cB+ioWemJ/KtBmbEiFk01a3wHvz0vGtrlWTFbIxxS 3t0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=TJpMY87fELTrg5mA4Y4a4uaVVh+rjyi1SSUPAv9QLBY=; b=QwzZd5oHFmTFsw+aHeQu4lLo9BkWui9uBAF59QHL7PCtX6q1HIZP/2ADLTNjVf2Wsb IRKBK3BI3qL20o0au1iB7KsEH6HrXebmIAibajL3CZLcoPuVL3XedplxfUiDO+rACqEG K+KYCOXZF+pQ3FOVOy37dmLEf/8f79yu9myt4F08yxTdiWbmWBNNmU9QXnE+3ygIQ+zU VtEYPUmegEC7ODdOXY51sVYxOs7Wv8+TfXdrHMGXy7G4s+GM71sReT0+5FX/pGvkbNHv CcmqiJZ+8Mfba+EAjeuGIYtxKHqSQuuCoVzPsU7GVR09SzNfoRYAttr/PqCBy40nnqPH pBvw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h4si1297340pgq.538.2021.10.27.14.26.49; Wed, 27 Oct 2021 14:27:01 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242542AbhJ0OY1 (ORCPT + 97 others); Wed, 27 Oct 2021 10:24:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:44768 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238285AbhJ0OYA (ORCPT ); Wed, 27 Oct 2021 10:24:00 -0400 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id F106B60F92; Wed, 27 Oct 2021 14:21:33 +0000 (UTC) Date: Wed, 27 Oct 2021 10:21:32 -0400 From: Steven Rostedt To: Tao Zhou Cc: Daniel Bristot de Oliveira , 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 Subject: Re: [PATCH V6 08/20] rtla: Helper functions for rtla Message-ID: <20211027102132.4bb0186b@gandalf.local.home> In-Reply-To: References: <183637700a31169e5d6d1c8a827c5365599ec806.1635284863.git.bristot@kernel.org> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 27 Oct 2021 22:02:46 +0800 Tao Zhou wrote: > > +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. Hi Tao, Please trim your emails and cut the part that is not needed in your reply. If I scroll down three times and see no text, I likely just delete the email without reading further. I know others that do the same. I exempted your email this time. -- Steve