linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Gortmaker <paul.gortmaker@windriver.com>
To: Joerg Roedel <joro@8bytes.org>
Cc: <iommu@lists.linux-foundation.org>,
	<linux-kernel@vger.kernel.org>,
	Paul Gortmaker <paul.gortmaker@windriver.com>
Subject: [PATCH 1/9] iommu: audit and remove any unnecessary uses of module.h
Date: Sat, 1 Dec 2018 14:19:09 -0500	[thread overview]
Message-ID: <1543691957-17608-2-git-send-email-paul.gortmaker@windriver.com> (raw)
In-Reply-To: <1543691957-17608-1-git-send-email-paul.gortmaker@windriver.com>

Historically a lot of these existed because we did not have
a distinction between what was modular code and what was providing
support to modules via EXPORT_SYMBOL and friends.  That changed
when we forked out support for the latter into the export.h file.
This means we should be able to reduce the usage of module.h
in code that is obj-y Makefile or bool Kconfig.

The advantage in removing such instances is that module.h itself
sources about 15 other headers; adding significantly to what we feed
cpp, and it can obscure what headers we are effectively using.

Since module.h might have been the implicit source for init.h
(for __init) and for export.h (for EXPORT_SYMBOL) we consider each
instance for the presence of either and replace as needed.

Cc: Joerg Roedel <joro@8bytes.org>
Cc: iommu@lists.linux-foundation.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 drivers/iommu/iommu-sysfs.c | 2 +-
 drivers/iommu/iommu.c       | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/iommu/iommu-sysfs.c b/drivers/iommu/iommu-sysfs.c
index 36d1a7ce7fc4..c298330ba2b7 100644
--- a/drivers/iommu/iommu-sysfs.c
+++ b/drivers/iommu/iommu-sysfs.c
@@ -11,7 +11,7 @@
 
 #include <linux/device.h>
 #include <linux/iommu.h>
-#include <linux/module.h>
+#include <linux/init.h>
 #include <linux/slab.h>
 
 /*
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
index f8ec49e0f6c6..cc25ec6d4c06 100644
--- a/drivers/iommu/iommu.c
+++ b/drivers/iommu/iommu.c
@@ -22,7 +22,8 @@
 #include <linux/kernel.h>
 #include <linux/bug.h>
 #include <linux/types.h>
-#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/export.h>
 #include <linux/slab.h>
 #include <linux/errno.h>
 #include <linux/iommu.h>
-- 
2.7.4


  reply	other threads:[~2018-12-01 19:19 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-01 19:19 [PATCH v2 0/9] iommu: clean up/remove modular stuff from non-modules Paul Gortmaker
2018-12-01 19:19 ` Paul Gortmaker [this message]
2018-12-01 19:19 ` [PATCH 2/9] iommu/rockchip: Make it explicitly non-modular Paul Gortmaker
2018-12-01 19:19 ` [PATCH 3/9] iommu/msm: " Paul Gortmaker
2018-12-01 19:19 ` [PATCH 4/9] iommu/mediatek: " Paul Gortmaker
2018-12-01 19:19 ` [PATCH 5/9] iommu/ipmmu-vmsa: " Paul Gortmaker
2018-12-01 19:19 ` [PATCH 6/9] iommu/qcom: " Paul Gortmaker
2018-12-01 19:19 ` [PATCH 7/9] iommu/tegra: " Paul Gortmaker
2018-12-01 19:19 ` [PATCH 8/9] iommu/arm-smmu: Make arm-smmu " Paul Gortmaker
2018-12-01 19:19 ` [PATCH 9/9] iommu/arm-smmu: Make arm-smmu-v3 " Paul Gortmaker
2018-12-03 13:32 ` [PATCH v2 0/9] iommu: clean up/remove modular stuff from non-modules Joerg Roedel
  -- strict thread matches above, loose matches on Subject: below --
2018-11-26 22:31 [PATCH " Paul Gortmaker
2018-11-26 22:31 ` [PATCH 1/9] iommu: audit and remove any unnecessary uses of module.h Paul Gortmaker

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=1543691957-17608-2-git-send-email-paul.gortmaker@windriver.com \
    --to=paul.gortmaker@windriver.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=joro@8bytes.org \
    --cc=linux-kernel@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).