From 26dd3e4ff9ac1aa576c97d23d7425d2544dbc5bf Mon Sep 17 00:00:00 2001 From: Paul Gortmaker Date: Sat, 28 Jan 2017 21:05:57 -0500 Subject: MIPS: 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/add as needed. Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. Build coverage of all the mips defconfigs revealed the module.h header was masking a couple of implicit include instances, so we add the appropriate headers there. Signed-off-by: Paul Gortmaker Cc: David Daney Cc: John Crispin Cc: Ralf Baechle Cc: "Steven J. Hill" Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/15131/ [james.hogan@imgtec.com: Preserve sort order where it already exists] Signed-off-by: James Hogan --- arch/mips/loongson64/common/cs5536/cs5536_mfgpt.c | 2 +- arch/mips/loongson64/common/env.c | 2 +- arch/mips/loongson64/common/setup.c | 3 ++- arch/mips/loongson64/common/uart_base.c | 2 +- arch/mips/loongson64/lemote-2f/ec_kb3310b.c | 3 ++- arch/mips/loongson64/lemote-2f/irq.c | 3 ++- arch/mips/loongson64/lemote-2f/pm.c | 2 +- arch/mips/loongson64/loongson-3/irq.c | 2 +- arch/mips/loongson64/loongson-3/numa.c | 2 +- 9 files changed, 12 insertions(+), 9 deletions(-) (limited to 'arch/mips/loongson64') diff --git a/arch/mips/loongson64/common/cs5536/cs5536_mfgpt.c b/arch/mips/loongson64/common/cs5536/cs5536_mfgpt.c index 9edfa55a0e78..b817d6d3a060 100644 --- a/arch/mips/loongson64/common/cs5536/cs5536_mfgpt.c +++ b/arch/mips/loongson64/common/cs5536/cs5536_mfgpt.c @@ -17,7 +17,7 @@ #include #include -#include +#include #include #include #include diff --git a/arch/mips/loongson64/common/env.c b/arch/mips/loongson64/common/env.c index 57d590ac8004..6afa21850267 100644 --- a/arch/mips/loongson64/common/env.c +++ b/arch/mips/loongson64/common/env.c @@ -17,7 +17,7 @@ * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. */ -#include +#include #include #include #include diff --git a/arch/mips/loongson64/common/setup.c b/arch/mips/loongson64/common/setup.c index 2dc5122f0e09..332387678f3e 100644 --- a/arch/mips/loongson64/common/setup.c +++ b/arch/mips/loongson64/common/setup.c @@ -7,7 +7,8 @@ * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. */ -#include +#include +#include #include #include diff --git a/arch/mips/loongson64/common/uart_base.c b/arch/mips/loongson64/common/uart_base.c index 9de559d58e1f..d27c41b237a0 100644 --- a/arch/mips/loongson64/common/uart_base.c +++ b/arch/mips/loongson64/common/uart_base.c @@ -8,7 +8,7 @@ * option) any later version. */ -#include +#include #include #include diff --git a/arch/mips/loongson64/lemote-2f/ec_kb3310b.c b/arch/mips/loongson64/lemote-2f/ec_kb3310b.c index 2b666d3a3947..321822997e76 100644 --- a/arch/mips/loongson64/lemote-2f/ec_kb3310b.c +++ b/arch/mips/loongson64/lemote-2f/ec_kb3310b.c @@ -10,7 +10,8 @@ * (at your option) any later version. */ -#include +#include +#include #include #include diff --git a/arch/mips/loongson64/lemote-2f/irq.c b/arch/mips/loongson64/lemote-2f/irq.c index cab5f43e0e29..9e33e45aa17c 100644 --- a/arch/mips/loongson64/lemote-2f/irq.c +++ b/arch/mips/loongson64/lemote-2f/irq.c @@ -8,8 +8,9 @@ * option) any later version. */ +#include +#include #include -#include #include #include diff --git a/arch/mips/loongson64/lemote-2f/pm.c b/arch/mips/loongson64/lemote-2f/pm.c index cac4d382ea73..6859e934862d 100644 --- a/arch/mips/loongson64/lemote-2f/pm.c +++ b/arch/mips/loongson64/lemote-2f/pm.c @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include diff --git a/arch/mips/loongson64/loongson-3/irq.c b/arch/mips/loongson64/loongson-3/irq.c index 8e7649088353..548f759454dc 100644 --- a/arch/mips/loongson64/loongson-3/irq.c +++ b/arch/mips/loongson64/loongson-3/irq.c @@ -1,7 +1,7 @@ #include #include #include -#include +#include #include #include diff --git a/arch/mips/loongson64/loongson-3/numa.c b/arch/mips/loongson64/loongson-3/numa.c index 282c5a8c2fcd..f17ef520799a 100644 --- a/arch/mips/loongson64/loongson-3/numa.c +++ b/arch/mips/loongson64/loongson-3/numa.c @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include #include -- cgit v1.2.3