Received: by 10.223.176.46 with SMTP id f43csp71051wra; Fri, 19 Jan 2018 13:59:56 -0800 (PST) X-Google-Smtp-Source: ACJfBou4N2ACgKsfGs0GXHRPZdXkpj/1DG0imxe5SFxzaisd3PQ3GTn8qph7hC9AJcso++8m2BqC X-Received: by 10.101.101.26 with SMTP id x26mr17151283pgv.149.1516399196769; Fri, 19 Jan 2018 13:59:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516399196; cv=none; d=google.com; s=arc-20160816; b=hTMedSTShphyP0LmY9+40HnhJ6EvUNsD6Jl1MRFKvKkEVbRmVPlfBX33/LuIiiFru0 X687TFzAMXlzh8wz8kgg66HvgpEyDNYH5uwXFExXKuSISDSLf5Ko4eQYi/d3nloDM7+/ pDRzHB75oUFwjQUOoetljLDvmMbgXh6zD9cXbtgAG9QJDsc7EIY6MIYTIHhV+/kZ21dL u77QPTAJl/2kcQA41qKMqEJhVN6AXKDh+V9V7kD1Dz2ydYt8DyROvDGkWnDtiUkOeThh Z38jnpF6Q0WFdf0TYrLV0QHLA1sDKOxgT4TRmAPmHmgQzW5HotA1u7kFcGrqaooTy8PL kLlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dmarc-filter:arc-authentication-results; bh=qmsHWviw954faYn7/Vqa2IN+sz2xpN4H5SlMCmDkgLA=; b=fMVHfMwbEI4HmEV6/t5ixx50GV36Xab/HAXTIlMr6DdCyya8aShpmfYqNAqNuMSqnb gwhJovqJO/ryxHihDYQJNWUGQ+J6+od07McgGVc3hwc5KOoLY794cOlivCWaJ6OQyTGe DFlRwAZ02BmAyC5reFw9DZQ9luMhdtLhyfXzpdh7694V+4m5yKtLDJRlqXbaXigutyZn a9OTbEMd9McwveDJoifwkGkwdUAKeqadY1RtWtSMK7qj0A821W2XoAoE/NQsQliqzYoV ubbWUdRNNwypx3QwcLGJNzYr0qLceCYAddY1OSVg9iYVd41mqvQzuinyRe8e9RN2Lysc lItw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e13si8555434pgn.811.2018.01.19.13.59.42; Fri, 19 Jan 2018 13:59:56 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756655AbeASV6m (ORCPT + 99 others); Fri, 19 Jan 2018 16:58:42 -0500 Received: from mail.kernel.org ([198.145.29.99]:42394 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756594AbeASV6F (ORCPT ); Fri, 19 Jan 2018 16:58:05 -0500 Received: from gandalf.local.home (cpe-172-100-180-131.stny.res.rr.com [172.100.180.131]) (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 AEA1E21719; Fri, 19 Jan 2018 21:58:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AEA1E21719 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=goodmis.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=rostedt@goodmis.org Date: Fri, 19 Jan 2018 16:58:02 -0500 From: Steven Rostedt To: "Vladislav Valtchev (VMware)" Cc: linux-trace-devel@vger.kernel.org, linux-kernel@vger.kernel.org, y.karadz@gmail.com Subject: Re: [PATCH v4 1/3] trace-cmd: Make read_proc() to return int status via OUT arg Message-ID: <20180119165802.19daee80@gandalf.local.home> In-Reply-To: <20180116195343.12800-2-vladislav.valtchev@gmail.com> References: <20180116195343.12800-1-vladislav.valtchev@gmail.com> <20180116195343.12800-2-vladislav.valtchev@gmail.com> X-Mailer: Claws Mail 3.14.0 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Just to let you know. I accepted all three of your patches. I have one comment, (and changed this myself). On Tue, 16 Jan 2018 21:53:41 +0200 "Vladislav Valtchev (VMware)" wrote: > file and then parse it as an integer using strtol(). Then, it makes the function This line is 80 characters. For commit logs, we recommend no more than 76 characters (some people suggest 74). The reason is that a git show will add 4 characters, to each line of the log, and this will cause an overflow like this: commit 68f00f512883fa7f1d04a7d88defff5e687bd98f Author: Vladislav Valtchev (VMware) Date: Tue Jan 16 21:53:41 2018 +0200 trace-cmd: Make read_proc() to return int status via OUT arg This patch changes both the implementation and the interface of read_proc() in trace-stack.c. First, it makes the function to read a string from the pro c file and then parse it as an integer using strtol(). Then, it makes the func tion to return the integer read from the proc file using the int *status OUT parameter, in order to make possible its return value to be used by the call er to check if the operation succeeded. This new implementation relaxes the external contraints the function relies on, making it possible to be used by trace stat. The point is that 'stat' should not fail in case there is something wrong with the stack tracer. Only the call t o die() in case the file is empty has been left in this patch: it will be remo ved as well in a separate commit. When editing a git log with the vim editor, I usually do :set tw=76 Thanks! -- Steve