Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp5392399img; Wed, 27 Mar 2019 07:44:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqx/PZFOBstd3OFlecwJMsqakI3PcWso0N8Y38kHzUD3zFpaxvG3CykiEMKo3xw4RRy4WCgE X-Received: by 2002:a63:c06:: with SMTP id b6mr34849827pgl.440.1553697855102; Wed, 27 Mar 2019 07:44:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553697855; cv=none; d=google.com; s=arc-20160816; b=AGmUqCMpMXKmWg/EzwiIxu8c3hXI8rIFhGerON8ZZf3zP9oU1j8vGpIurwbQ0icmjn nggMwNCATqZMVeS2+TNp7QexYH7M6DbucQhMcrE5PsAvoNChBorheE/kmx3qjcZF4+A3 T+XpibHNQj0ioM9FrQ7KMmRuvEWxyxEM7nTuYuqMQCMTFlguvwLZBWq/kWGNZM39Xt/9 lnyCYFPrAANVO4FlwTKFo5MZ1mRhyf19nOPPCU7eh0CVQ7SkQLvtxJrsRsuEeHmh9NB4 VWfSZa+5vZLe8NlWrJvUCW9OnXBHmHltovaK1mo/O8il3PmWfJSZ+3c0AwsOJCU7un/2 qG8g== 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; bh=++Tt5/CJ4tCBdvHxEJusJFxApAj1bx+wzMUMMVaK5NY=; b=VhWK1jsIBiGsMvbW0AGh3cTn2WTBSxdFMeP88pZRe27UFnfaorjaxW4c6LSYSBJPVG hy5N26wGHQkNhqJqzi3VCNqdtW21TRv6QvYynea1l/pnLAssRsfq/IKyY2Hx8mJbvC80 osH5I0uczSVUWu6FnJzLgKtfHwtMNaRvmsZk/SHVKDDlzgm8SDUdifvJE/b//jfjlmvI RBGi/eID4KwLlXiGJaiTkGwgp7jdUUFgajw3Xrk1n/K890lWbPcdmHMdZNK4k8N2CIV0 a4oZPfrF+6KRqdK6WyJUw2/Wmix1MMqzzlScugBjislTmtZlmG88MP4TLX+aBOMI+kQl 6q7Q== 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 u193si14408445pgc.410.2019.03.27.07.43.58; Wed, 27 Mar 2019 07:44:15 -0700 (PDT) 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 S1728516AbfC0Olw (ORCPT + 99 others); Wed, 27 Mar 2019 10:41:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:58854 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725764AbfC0Olw (ORCPT ); Wed, 27 Mar 2019 10:41:52 -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 1E3E72087C; Wed, 27 Mar 2019 14:41:51 +0000 (UTC) Date: Wed, 27 Mar 2019 10:41:49 -0400 From: Steven Rostedt To: Tzvetomir Stoyanov Cc: linux-trace-devel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/5] tools/perf,tools/lib/traceevent: Make traceevent APIs more consistent Message-ID: <20190327104149.17319833@gandalf.local.home> In-Reply-To: <20190327141946.4353-2-tstoyanov@vmware.com> References: <20190327141946.4353-1-tstoyanov@vmware.com> <20190327141946.4353-2-tstoyanov@vmware.com> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; 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 On Wed, 27 Mar 2019 16:19:42 +0200 Tzvetomir Stoyanov wrote: > /** > - * tep_file_bigendian - get if the file is in big endian order > + * tep_is_file_bigendian - return the endian of the file > * @pevent: a handle to the tep_handle > * > - * This returns if the file is in big endian order > - * If @pevent is NULL, 0 is returned. > + * This returns true if the file is in big endian order > + * If @pevent is NULL, false is returned. > */ > -int tep_file_bigendian(struct tep_handle *pevent) > +bool tep_is_file_bigendian(struct tep_handle *pevent) > { > if (pevent) > - return pevent->file_bigendian; > - return 0; > + return (pevent->file_bigendian == TEP_BIG_ENDIAN); One thing I should have mentioned before, is that, when people write returns like this to the Linux kernel mailing list, you might get a comment like: "return is not a function, lose the parenthesis". That is, it should be: return pevent->file_bigendian == TEP_BIG_ENDIAN; not return (pevent->file_bigendian == TEP_BIG_ENDIAN); If this is the only issue, I may just fix it myself. Just remember that returns should never have an outside parenthesis. -- Steve > + return false; > } >