mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>,
	Ingo Molnar <mingo@redhat.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: how to handle tracing .h loops
Date: Thu, 18 Aug 2011 09:24:59 -0400	[thread overview]
Message-ID: <1313673899.15704.66.camel@gandalf.stny.rr.com> (raw)
In-Reply-To: <1313668662.5010.303.camel@zakaz.uk.xensource.com>

On Thu, 2011-08-18 at 12:57 +0100, Ian Campbell wrote:
> On Thu, 2011-08-18 at 12:51 +0100, Ian Campbell wrote:
> > Clearly other places are including interrupt.h and highmem.h without
> > issue so what am I doing wrong here?
> 
> I guess I should have look at the .c file instead of concentrating on
> the .h's because this works:
> 
> diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
> index 7b996ed..3f5ee74 100644
> --- a/include/linux/skbuff.h
> +++ b/include/linux/skbuff.h
> @@ -29,6 +29,7 @@
>  #include <linux/rcupdate.h>
>  #include <linux/dmaengine.h>
>  #include <linux/hrtimer.h>
> +#include <linux/highmem.h>
>  
>  /* Don't change this without changing skb_csum_unnecessary! */
>  #define CHECKSUM_NONE 0
> diff --git a/kernel/signal.c b/kernel/signal.c
> index 291c970..ff432ec 100644
> --- a/kernel/signal.c
> +++ b/kernel/signal.c
> @@ -30,6 +30,7 @@
>  #include <linux/nsproxy.h>
>  #define CREATE_TRACE_POINTS
>  #include <trace/events/signal.h>
> +#undef CREATE_TRACE_POINTS

I think the better solution is to move this down below the asms. But as
this does work, I'm don't have any big preference against it.

>  
>  #include <asm/param.h>
>  #include <asm/uaccess.h>
> 
> 
> But that seems odd (noone else does it). Perhaps I should instead move
> that include to last in the file? i.e.:
> 
> diff --git a/kernel/signal.c b/kernel/signal.c
> index 291c970..d3cd4e7 100644
> --- a/kernel/signal.c
> +++ b/kernel/signal.c
> @@ -28,8 +28,6 @@
>  #include <linux/freezer.h>
>  #include <linux/pid_namespace.h>
>  #include <linux/nsproxy.h>
> -#define CREATE_TRACE_POINTS
> -#include <trace/events/signal.h>
>  
>  #include <asm/param.h>
>  #include <asm/uaccess.h>
> @@ -37,6 +35,9 @@
>  #include <asm/siginfo.h>
>  #include "audit.h"	/* audit_signal_info() */
>  
> +#define CREATE_TRACE_POINTS
> +#include <trace/events/signal.h>
> +

Yes, the trace events headers are suppose to be the last headers
included.

Either method works. Either undefine CREATE_TRACE_POINTS or move the
headers down. Only the C file should be depending on the header anyway.

Thanks!

-- Steve

>  /*
>   * SLAB caches for signal bits.
>   */
> 
> Ian.



      reply	other threads:[~2011-08-18 13:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-18 11:51 Ian Campbell
2011-08-18 11:57 ` Ian Campbell
2011-08-18 13:24   ` Steven Rostedt [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1313673899.15704.66.camel@gandalf.stny.rr.com \
    --to=rostedt@goodmis.org \
    --cc=Ian.Campbell@citrix.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®