diff options
author | Paul Gortmaker <paul.gortmaker@windriver.com> | 2016-09-19 22:44:50 +0200 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2016-10-19 18:00:03 +0200 |
commit | 7963b8a59845eabafa0e8ff330a2e0884f0279a9 (patch) | |
tree | 382f09c43fd4ca26bdae00410e631311fe6ab90a /fs/dlm/main.c | |
parent | dlm: make genl_ops const (diff) | |
download | linux-7963b8a59845eabafa0e8ff330a2e0884f0279a9.tar.xz linux-7963b8a59845eabafa0e8ff330a2e0884f0279a9.zip |
dlm: audit and remove any unnecessary uses of module.h
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.
In the dlm case, we remove module.h from a global header and only
introduce it in the files where it is explicitly required, since
there is nothing modular in dlm_internal.h itself.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/dlm/main.c')
-rw-r--r-- | fs/dlm/main.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/dlm/main.c b/fs/dlm/main.c index 079c0bd71ab7..8e1b618891be 100644 --- a/fs/dlm/main.c +++ b/fs/dlm/main.c @@ -11,6 +11,8 @@ ******************************************************************************* ******************************************************************************/ +#include <linux/module.h> + #include "dlm_internal.h" #include "lockspace.h" #include "lock.h" |