On Fri, 20 Oct 2023 09:03:59 -0600
Jeffrey Hugo <quic_jh...@quicinc.com> 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 <linux/wait.h>
> >   #include "internal.h"
> >   
> > +#define CREATE_TRACE_POINTS
> > +#include <trace/events/mhi_host.h>  
> 
> 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

Reply via email to