public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: torvalds@linux-foundation.org, akpm@linux-foundation.org,
	linux-kernel@vger.kernel.org, Lee.Schermerhorn@hp.com,
	cl@linux-foundation.org, mingo@elte.hu, adobriyan@gmail.com,
	tglx@linutronix.de, hpa@zytor.com, yi.zhu@intel.com,
	reinette.chatre@intel.com, ilw@linux.intel.com
Cc: Tejun Heo <tj@kernel.org>, Ingo Molnar <mingo@redhat.com>
Subject: [PATCH 2/4] iwlwifi: don't include iwl-dev.h from iwl-devtrace.h
Date: Wed, 24 Mar 2010 17:48:56 +0900	[thread overview]
Message-ID: <1269420538-18039-3-git-send-email-tj@kernel.org> (raw)
In-Reply-To: <1269420538-18039-1-git-send-email-tj@kernel.org>

iwl-devtrace.h is used to declare and define trace points and
including iwl-dev.h from the file, which in turn includes other
generic headers can lead to problems like generating duplicate copies
of generic trace points depending on the order of includes.  Don't
include iwl-dev.h from iwl-devtrace.h but include it from its users -
iwl-io.h and iwl-devtrace.c.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Zhu Yi <yi.zhu@intel.com>
Cc: Reinette Chatre <reinette.chatre@intel.com>
Cc: Intel Linux Wireless <ilw@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
---
 drivers/net/wireless/iwlwifi/iwl-devtrace.c |    2 ++
 drivers/net/wireless/iwlwifi/iwl-devtrace.h |    1 -
 drivers/net/wireless/iwlwifi/iwl-io.h       |    1 +
 3 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-devtrace.c b/drivers/net/wireless/iwlwifi/iwl-devtrace.c
index 36580d8..2ffc2ed 100644
--- a/drivers/net/wireless/iwlwifi/iwl-devtrace.c
+++ b/drivers/net/wireless/iwlwifi/iwl-devtrace.c
@@ -28,6 +28,8 @@
 
 /* sparse doesn't like tracepoint macros */
 #ifndef __CHECKER__
+#include "iwl-dev.h"
+
 #define CREATE_TRACE_POINTS
 #include "iwl-devtrace.h"
 
diff --git a/drivers/net/wireless/iwlwifi/iwl-devtrace.h b/drivers/net/wireless/iwlwifi/iwl-devtrace.h
index ff4d012..ae7319b 100644
--- a/drivers/net/wireless/iwlwifi/iwl-devtrace.h
+++ b/drivers/net/wireless/iwlwifi/iwl-devtrace.h
@@ -28,7 +28,6 @@
 #define __IWLWIFI_DEVICE_TRACE
 
 #include <linux/tracepoint.h>
-#include "iwl-dev.h"
 
 #if !defined(CONFIG_IWLWIFI_DEVICE_TRACING) || defined(__CHECKER__)
 #undef TRACE_EVENT
diff --git a/drivers/net/wireless/iwlwifi/iwl-io.h b/drivers/net/wireless/iwlwifi/iwl-io.h
index c719baf..16eb3ce 100644
--- a/drivers/net/wireless/iwlwifi/iwl-io.h
+++ b/drivers/net/wireless/iwlwifi/iwl-io.h
@@ -31,6 +31,7 @@
 
 #include <linux/io.h>
 
+#include "iwl-dev.h"
 #include "iwl-debug.h"
 #include "iwl-devtrace.h"
 
-- 
1.6.4.2


  parent reply	other threads:[~2010-03-24  8:49 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-24  8:48 [PATCHSET] remove implicit slab.h inclusion from from percpu.h Tejun Heo
2010-03-24  8:48 ` [PATCH 1/4] x86: don't include slab.h from arch/x86/include/asm/pgtable_32.h Tejun Heo
2010-03-24 10:58   ` Pekka Enberg
2010-03-24 19:43     ` Christoph Lameter
2010-03-24  8:48 ` Tejun Heo [this message]
2010-03-24 17:55   ` [PATCH 2/4] iwlwifi: don't include iwl-dev.h from iwl-devtrace.h reinette chatre
2010-03-24  8:48 ` [PATCH 3/4] include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h Tejun Heo
2010-03-24 11:00   ` Pekka Enberg
2010-03-24 11:57     ` Alexey Dobriyan
2010-03-24 13:33       ` Tejun Heo
2010-03-24 19:42   ` Christoph Lameter
2010-03-30 14:30   ` Lee Schermerhorn
2010-03-31  2:41     ` Tejun Heo
2010-03-24  8:48 ` [PATCH 4/4] percpu: don't implicitly include slab.h " Tejun Heo
2010-03-24 19:23   ` Christoph Lameter
2010-03-29  0:50 ` [PATCHSET] remove implicit slab.h inclusion from " Tejun Heo

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=1269420538-18039-3-git-send-email-tj@kernel.org \
    --to=tj@kernel.org \
    --cc=Lee.Schermerhorn@hp.com \
    --cc=adobriyan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux-foundation.org \
    --cc=hpa@zytor.com \
    --cc=ilw@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mingo@redhat.com \
    --cc=reinette.chatre@intel.com \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=yi.zhu@intel.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