diff mbox

[V9fs-developer,2/2] 9p: audit and remove any unnecessary uses of module.h

Message ID 20160919205538.29937-2-paul.gortmaker@windriver.com (mailing list archive)
State Superseded, archived
Headers show

Commit Message

Paul Gortmaker Sept. 19, 2016, 8:55 p.m. UTC
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.  In the case of
some code where it is modular, we can extend that to also include
files that are building basic support functionality but not related
to loading or registering the final module; such files also have
no need whatsoever for module.h

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: Eric Van Hensbergen <ericvh@gmail.com>
Cc: Ron Minnich <rminnich@sandia.gov>
Cc: Latchesar Ionkov <lucho@ionkov.net>
Cc: v9fs-developer@lists.sourceforge.net
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---

[I've been building these 2 on linux-next on a regular basis for
 allmodconfig for x86(32/64) ARM(32/64) ppc and mips so there
 shouldn't be any unseen fallout.]

 fs/9p/acl.c            | 1 -
 fs/9p/fid.c            | 1 -
 fs/9p/vfs_addr.c       | 1 -
 fs/9p/vfs_dentry.c     | 1 -
 fs/9p/vfs_dir.c        | 1 -
 fs/9p/vfs_file.c       | 1 -
 fs/9p/vfs_inode.c      | 1 -
 fs/9p/vfs_inode_dotl.c | 1 -
 fs/9p/vfs_super.c      | 1 -
 fs/9p/xattr.c          | 1 -
 10 files changed, 10 deletions(-)
diff mbox

Patch

diff --git a/fs/9p/acl.c b/fs/9p/acl.c
index 5b6a1743ea17..d8da35537e43 100644
--- a/fs/9p/acl.c
+++ b/fs/9p/acl.c
@@ -12,7 +12,6 @@ 
  *
  */
 
-#include <linux/module.h>
 #include <linux/fs.h>
 #include <net/9p/9p.h>
 #include <net/9p/client.h>
diff --git a/fs/9p/fid.c b/fs/9p/fid.c
index 47db55aee7f2..c8f66c1d82e2 100644
--- a/fs/9p/fid.c
+++ b/fs/9p/fid.c
@@ -21,7 +21,6 @@ 
  *
  */
 
-#include <linux/module.h>
 #include <linux/errno.h>
 #include <linux/fs.h>
 #include <linux/slab.h>
diff --git a/fs/9p/vfs_addr.c b/fs/9p/vfs_addr.c
index 6181ad79e1a5..31fb1ffd4346 100644
--- a/fs/9p/vfs_addr.c
+++ b/fs/9p/vfs_addr.c
@@ -23,7 +23,6 @@ 
  *
  */
 
-#include <linux/module.h>
 #include <linux/errno.h>
 #include <linux/fs.h>
 #include <linux/file.h>
diff --git a/fs/9p/vfs_dentry.c b/fs/9p/vfs_dentry.c
index bd456c668d39..9d20c0878fb4 100644
--- a/fs/9p/vfs_dentry.c
+++ b/fs/9p/vfs_dentry.c
@@ -23,7 +23,6 @@ 
  *
  */
 
-#include <linux/module.h>
 #include <linux/errno.h>
 #include <linux/fs.h>
 #include <linux/file.h>
diff --git a/fs/9p/vfs_dir.c b/fs/9p/vfs_dir.c
index b0405d6aac85..e1b2c1e557b9 100644
--- a/fs/9p/vfs_dir.c
+++ b/fs/9p/vfs_dir.c
@@ -23,7 +23,6 @@ 
  *
  */
 
-#include <linux/module.h>
 #include <linux/errno.h>
 #include <linux/fs.h>
 #include <linux/file.h>
diff --git a/fs/9p/vfs_file.c b/fs/9p/vfs_file.c
index d7b78d531e63..c8c7dfc1bb3d 100644
--- a/fs/9p/vfs_file.c
+++ b/fs/9p/vfs_file.c
@@ -23,7 +23,6 @@ 
  *
  */
 
-#include <linux/module.h>
 #include <linux/errno.h>
 #include <linux/fs.h>
 #include <linux/sched.h>
diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c
index 7da9a8354fad..7650fbacfa25 100644
--- a/fs/9p/vfs_inode.c
+++ b/fs/9p/vfs_inode.c
@@ -25,7 +25,6 @@ 
 
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
-#include <linux/module.h>
 #include <linux/errno.h>
 #include <linux/fs.h>
 #include <linux/file.h>
diff --git a/fs/9p/vfs_inode_dotl.c b/fs/9p/vfs_inode_dotl.c
index 2ed04c2fe7af..9e2a9300ba09 100644
--- a/fs/9p/vfs_inode_dotl.c
+++ b/fs/9p/vfs_inode_dotl.c
@@ -23,7 +23,6 @@ 
  *
  */
 
-#include <linux/module.h>
 #include <linux/errno.h>
 #include <linux/fs.h>
 #include <linux/file.h>
diff --git a/fs/9p/vfs_super.c b/fs/9p/vfs_super.c
index 94dc50527a7b..a6d3fe02ec1c 100644
--- a/fs/9p/vfs_super.c
+++ b/fs/9p/vfs_super.c
@@ -25,7 +25,6 @@ 
  */
 
 #include <linux/kernel.h>
-#include <linux/module.h>
 #include <linux/errno.h>
 #include <linux/fs.h>
 #include <linux/file.h>
diff --git a/fs/9p/xattr.c b/fs/9p/xattr.c
index a6bd349bab23..f57508eb4e63 100644
--- a/fs/9p/xattr.c
+++ b/fs/9p/xattr.c
@@ -12,7 +12,6 @@ 
  *
  */
 
-#include <linux/module.h>
 #include <linux/fs.h>
 #include <linux/sched.h>
 #include <linux/uio.h>