From: tip-bot for Paul Gortmaker <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: torvalds@linux-foundation.org, tglx@linutronix.de,
peterz@infradead.org, hpa@zytor.com,
linux-kernel@vger.kernel.org, paul.gortmaker@windriver.com,
mingo@kernel.org
Subject: [tip:x86/headers] x86/platform: Audit and remove any unnecessary uses of module.h
Date: Thu, 14 Jul 2016 11:44:39 -0700 [thread overview]
Message-ID: <tip-cc3ae7b0af27118994c1e491382b253be3b762bf@git.kernel.org> (raw)
In-Reply-To: <20160714001901.31603-6-paul.gortmaker@windriver.com>
Commit-ID: cc3ae7b0af27118994c1e491382b253be3b762bf
Gitweb: http://git.kernel.org/tip/cc3ae7b0af27118994c1e491382b253be3b762bf
Author: Paul Gortmaker <paul.gortmaker@windriver.com>
AuthorDate: Wed, 13 Jul 2016 20:18:58 -0400
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Thu, 14 Jul 2016 15:06:59 +0200
x86/platform: 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. The advantage
in doing so 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 was the source for init.h (for __init) and for
export.h (for EXPORT_SYMBOL) we consider each obj-y/bool instance
for the presence of either and replace as needed.
One module.h was converted to moduleparam.h since the file had
multiple module_param() in it, and another file had an instance of
MODULE_DEVICE_TABLE deleted, since that is a no-op when builtin.
Finally, the 32 bit build coverage of olpc_ofw revealed a couple
implicit includes, which were pretty self evident to fix based on
what gcc was complaining about.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20160714001901.31603-6-paul.gortmaker@windriver.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
arch/x86/platform/ce4100/ce4100.c | 2 +-
arch/x86/platform/efi/efi_64.c | 2 +-
arch/x86/platform/intel-mid/intel-mid.c | 2 +-
arch/x86/platform/intel-mid/pwr.c | 4 +---
arch/x86/platform/intel-mid/sfi.c | 2 +-
arch/x86/platform/olpc/olpc.c | 2 +-
arch/x86/platform/olpc/olpc_ofw.c | 5 ++++-
arch/x86/platform/ts5500/ts5500.c | 2 +-
arch/x86/platform/uv/uv_irq.c | 2 +-
arch/x86/platform/uv/uv_nmi.c | 2 +-
10 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/arch/x86/platform/ce4100/ce4100.c b/arch/x86/platform/ce4100/ce4100.c
index 701fd58..7ab4d3f 100644
--- a/arch/x86/platform/ce4100/ce4100.c
+++ b/arch/x86/platform/ce4100/ce4100.c
@@ -11,7 +11,7 @@
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/irq.h>
-#include <linux/module.h>
+#include <linux/init.h>
#include <linux/reboot.h>
#include <linux/serial_reg.h>
#include <linux/serial_8250.h>
diff --git a/arch/x86/platform/efi/efi_64.c b/arch/x86/platform/efi/efi_64.c
index b226b3f..2f98445 100644
--- a/arch/x86/platform/efi/efi_64.c
+++ b/arch/x86/platform/efi/efi_64.c
@@ -24,7 +24,7 @@
#include <linux/spinlock.h>
#include <linux/bootmem.h>
#include <linux/ioport.h>
-#include <linux/module.h>
+#include <linux/init.h>
#include <linux/efi.h>
#include <linux/uaccess.h>
#include <linux/io.h>
diff --git a/arch/x86/platform/intel-mid/intel-mid.c b/arch/x86/platform/intel-mid/intel-mid.c
index abbf49c..ce119d2 100644
--- a/arch/x86/platform/intel-mid/intel-mid.c
+++ b/arch/x86/platform/intel-mid/intel-mid.c
@@ -20,7 +20,7 @@
#include <linux/scatterlist.h>
#include <linux/sfi.h>
#include <linux/irq.h>
-#include <linux/module.h>
+#include <linux/export.h>
#include <linux/notifier.h>
#include <asm/setup.h>
diff --git a/arch/x86/platform/intel-mid/pwr.c b/arch/x86/platform/intel-mid/pwr.c
index 5bc90dd..c901a34 100644
--- a/arch/x86/platform/intel-mid/pwr.c
+++ b/arch/x86/platform/intel-mid/pwr.c
@@ -21,10 +21,9 @@
#include <linux/delay.h>
#include <linux/errno.h>
-#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
-#include <linux/module.h>
+#include <linux/export.h>
#include <linux/mutex.h>
#include <linux/pci.h>
@@ -407,7 +406,6 @@ static const struct pci_device_id mid_pwr_pci_ids[] = {
{ PCI_VDEVICE(INTEL, PCI_DEVICE_ID_TANGIER), (kernel_ulong_t)&mid_info },
{}
};
-MODULE_DEVICE_TABLE(pci, mid_pwr_pci_ids);
static struct pci_driver mid_pwr_pci_driver = {
.name = "intel_mid_pwr",
diff --git a/arch/x86/platform/intel-mid/sfi.c b/arch/x86/platform/intel-mid/sfi.c
index 1555672..051d264 100644
--- a/arch/x86/platform/intel-mid/sfi.c
+++ b/arch/x86/platform/intel-mid/sfi.c
@@ -24,7 +24,7 @@
#include <linux/input.h>
#include <linux/platform_device.h>
#include <linux/irq.h>
-#include <linux/module.h>
+#include <linux/export.h>
#include <linux/notifier.h>
#include <linux/mmc/core.h>
#include <linux/mmc/card.h>
diff --git a/arch/x86/platform/olpc/olpc.c b/arch/x86/platform/olpc/olpc.c
index 2737608..7c3077e 100644
--- a/arch/x86/platform/olpc/olpc.c
+++ b/arch/x86/platform/olpc/olpc.c
@@ -12,7 +12,7 @@
#include <linux/kernel.h>
#include <linux/init.h>
-#include <linux/module.h>
+#include <linux/export.h>
#include <linux/delay.h>
#include <linux/io.h>
#include <linux/string.h>
diff --git a/arch/x86/platform/olpc/olpc_ofw.c b/arch/x86/platform/olpc/olpc_ofw.c
index e7604f6..f1aab8c 100644
--- a/arch/x86/platform/olpc/olpc_ofw.c
+++ b/arch/x86/platform/olpc/olpc_ofw.c
@@ -1,9 +1,12 @@
#include <linux/kernel.h>
-#include <linux/module.h>
+#include <linux/export.h>
+#include <linux/spinlock_types.h>
#include <linux/init.h>
#include <asm/page.h>
#include <asm/setup.h>
#include <asm/io.h>
+#include <asm/cpufeature.h>
+#include <asm/special_insns.h>
#include <asm/pgtable.h>
#include <asm/olpc_ofw.h>
diff --git a/arch/x86/platform/ts5500/ts5500.c b/arch/x86/platform/ts5500/ts5500.c
index baf16e7..952191b 100644
--- a/arch/x86/platform/ts5500/ts5500.c
+++ b/arch/x86/platform/ts5500/ts5500.c
@@ -23,7 +23,7 @@
#include <linux/io.h>
#include <linux/kernel.h>
#include <linux/leds.h>
-#include <linux/module.h>
+#include <linux/init.h>
#include <linux/platform_data/gpio-ts5500.h>
#include <linux/platform_data/max197.h>
#include <linux/platform_device.h>
diff --git a/arch/x86/platform/uv/uv_irq.c b/arch/x86/platform/uv/uv_irq.c
index e1c2463..776c659 100644
--- a/arch/x86/platform/uv/uv_irq.c
+++ b/arch/x86/platform/uv/uv_irq.c
@@ -8,7 +8,7 @@
* Copyright (C) 2008 Silicon Graphics, Inc. All rights reserved.
*/
-#include <linux/module.h>
+#include <linux/export.h>
#include <linux/rbtree.h>
#include <linux/slab.h>
#include <linux/irq.h>
diff --git a/arch/x86/platform/uv/uv_nmi.c b/arch/x86/platform/uv/uv_nmi.c
index 8dd8005..cd5173a 100644
--- a/arch/x86/platform/uv/uv_nmi.c
+++ b/arch/x86/platform/uv/uv_nmi.c
@@ -24,7 +24,7 @@
#include <linux/kdb.h>
#include <linux/kexec.h>
#include <linux/kgdb.h>
-#include <linux/module.h>
+#include <linux/moduleparam.h>
#include <linux/nmi.h>
#include <linux/sched.h>
#include <linux/slab.h>
next prev parent reply other threads:[~2016-07-14 18:45 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-14 0:18 [PATCH 0/8] x86: audit and remove needless module.h includes Paul Gortmaker
2016-07-14 0:18 ` [PATCH 1/8] x86: don't use module.h just for AUTHOR / LICENSE tags Paul Gortmaker
2016-07-14 0:22 ` Arjan van de Ven
2016-07-14 18:43 ` [tip:x86/headers] x86: Don't " tip-bot for Paul Gortmaker
2016-07-14 0:18 ` [PATCH 2/8] x86: mm: audit and remove any unnecessary uses of module.h Paul Gortmaker
2016-07-14 18:43 ` [tip:x86/headers] x86/mm: Audit " tip-bot for Paul Gortmaker
2016-07-14 0:18 ` [PATCH 3/8] x86: kernel: audit " Paul Gortmaker
2016-07-14 18:43 ` [tip:x86/headers] x86/kernel: Audit " tip-bot for Paul Gortmaker
2016-07-14 0:18 ` [PATCH 4/8] x86: lib: audit " Paul Gortmaker
2016-07-14 18:44 ` [tip:x86/headers] x86/lib: Audit " tip-bot for Paul Gortmaker
2016-07-14 0:18 ` [PATCH 5/8] x86: platform: audit " Paul Gortmaker
2016-07-14 18:44 ` tip-bot for Paul Gortmaker [this message]
2016-07-14 0:18 ` [PATCH 6/8] x86: xen: " Paul Gortmaker
2016-07-14 3:59 ` Juergen Gross
2016-07-14 18:45 ` [tip:x86/headers] x86/xen: Audit " tip-bot for Paul Gortmaker
2016-07-14 0:19 ` [PATCH 7/8] x86: kvm: audit " Paul Gortmaker
2016-07-14 7:42 ` Paolo Bonzini
2016-07-14 18:45 ` [tip:x86/headers] x86/kvm: Audit " tip-bot for Paul Gortmaker
2016-07-14 0:19 ` [PATCH 8/8] x86: audit and remove any remaining " Paul Gortmaker
2016-07-14 18:45 ` [tip:x86/headers] x86: Audit " tip-bot for Paul Gortmaker
2016-07-14 13:04 ` [PATCH 0/8] x86: audit and remove needless module.h includes Ingo Molnar
2016-07-14 15:18 ` Paul Gortmaker
2016-07-14 18:39 ` Ingo Molnar
2016-07-14 18:46 ` Paul Gortmaker
2016-07-14 18:56 ` Ingo Molnar
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=tip-cc3ae7b0af27118994c1e491382b253be3b762bf@git.kernel.org \
--to=tipbot@zytor.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=paul.gortmaker@windriver.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.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
Powered by JetHome