From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A94A6C0032E for ; Fri, 20 Oct 2023 16:28:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377823AbjJTQ2m (ORCPT ); Fri, 20 Oct 2023 12:28:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51164 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377777AbjJTQ2k (ORCPT ); Fri, 20 Oct 2023 12:28:40 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B8B58CA; Fri, 20 Oct 2023 09:28:38 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 056B9C433C7; Fri, 20 Oct 2023 16:28:36 +0000 (UTC) Date: Fri, 20 Oct 2023 12:28:33 -0400 From: Steven Rostedt To: Jeffrey Hugo Cc: Krishna chaitanya chundru , "Manivannan Sadhasivam" , "Masami Hiramatsu" , , , , , , , , , Subject: Re: [PATCH v2] bus: mhi: host: Add tracing support Message-ID: <20231020122833.647bbc49@gandalf.local.home> In-Reply-To: <9216f694-cce0-2b95-df34-e5b60538644a@quicinc.com> References: <20231013-ftrace_support-v2-1-6e893ce010b5@quicinc.com> <9216f694-cce0-2b95-df34-e5b60538644a@quicinc.com> X-Mailer: Claws Mail 3.19.1 (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 Fri, 20 Oct 2023 09:03:59 -0600 Jeffrey Hugo wrote: > > diff --git a/drivers/bus/mhi/host/init.c b/drivers/bus/mhi/host/init.c > > index f78aefd2d7a3..3afa90a204fd 100644 > > --- a/drivers/bus/mhi/host/init.c > > +++ b/drivers/bus/mhi/host/init.c > > @@ -20,6 +20,9 @@ > > #include > > #include "internal.h" > > > > +#define CREATE_TRACE_POINTS > > +#include > > This feels redundant to me. A few lines ago we included internal.h, and > internal.h includes trace/events/mhi_host.h It's not redundant. The #define CREATE_TRACE_POINTS enables the magic of creating the tracepoints and trace events via the TRACE_EVENT() macro. It should never be done in a header file, only in .c code! The header file include of trace headers are used for having access to the declarations of the functions. That is (trace_*()) in the code. -- Steve