]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
x86/xen: Audit and remove any unnecessary uses of module.h
authorPaul Gortmaker <paul.gortmaker@windriver.com>
Thu, 14 Jul 2016 00:18:59 +0000 (20:18 -0400)
committerBob Liu <bob.liu@oracle.com>
Thu, 20 Oct 2016 08:00:30 +0000 (04:00 -0400)
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.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Acked-by: Juergen Gross <jgross@suse.com>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: David Vrabel <david.vrabel@citrix.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: xen-devel@lists.xenproject.org
Link: http://lkml.kernel.org/r/20160714001901.31603-7-paul.gortmaker@windriver.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
(cherry picked from commit 7a2463dcacee3f2f36c78418c201756372eeea6b)
Signed-off-by: Bob Liu <bob.liu@oracle.com>
Orabug: 24820937

arch/x86/xen/debugfs.c
arch/x86/xen/enlighten.c
arch/x86/xen/mmu.c
arch/x86/xen/p2m.c
arch/x86/xen/platform-pci-unplug.c
arch/x86/xen/setup.c

index c8377fb26cdfc488fa7ea248de8369e3e0464373..1daff5545c0a17992a112d5f677f9930c8698a29 100644 (file)
@@ -1,7 +1,6 @@
 #include <linux/init.h>
 #include <linux/debugfs.h>
 #include <linux/slab.h>
-#include <linux/module.h>
 
 #include "debugfs.h"
 
index 928916bfb0d6e2923b41a943ea114ca3cef402d1..3853741c4d163e96d9980a0d9c392cd9d966b9ac 100644 (file)
@@ -23,7 +23,7 @@
 #include <linux/sched.h>
 #include <linux/kprobes.h>
 #include <linux/bootmem.h>
-#include <linux/module.h>
+#include <linux/export.h>
 #include <linux/mm.h>
 #include <linux/page-flags.h>
 #include <linux/highmem.h>
index dbfc5b6c4a8e4b798c1347965fa889d4031db0c8..9bbe9cb10b9c4d706944e8b16cc91f8cf2713143 100644 (file)
@@ -43,7 +43,8 @@
 #include <linux/debugfs.h>
 #include <linux/bug.h>
 #include <linux/vmalloc.h>
-#include <linux/module.h>
+#include <linux/export.h>
+#include <linux/init.h>
 #include <linux/gfp.h>
 #include <linux/memblock.h>
 #include <linux/seq_file.h>
index deee550060c4b916808ca9634d4ec0bf36eb5eb5..b64bacbc962b032b6e950a2fd97ecda89f3d6030 100644 (file)
@@ -60,7 +60,7 @@
  */
 
 #include <linux/init.h>
-#include <linux/module.h>
+#include <linux/export.h>
 #include <linux/list.h>
 #include <linux/hash.h>
 #include <linux/sched.h>
index 9586ff32810cfb7e24ee721c69aef44cafd94377..d37a0c7f82cb770b6eb902655802c744d145a1cf 100644 (file)
@@ -21,7 +21,7 @@
 
 #include <linux/init.h>
 #include <linux/io.h>
-#include <linux/module.h>
+#include <linux/export.h>
 
 #include <xen/platform_pci.h>
 #include "xen-ops.h"
index 80993f7416b258f00e47467d5a8893e23bdd2a6e..b615bdcb1b2f1ff71b377a6bfc3962af640eb2aa 100644 (file)
@@ -4,7 +4,7 @@
  * Jeremy Fitzhardinge <jeremy@xensource.com>, XenSource Inc, 2007
  */
 
-#include <linux/module.h>
+#include <linux/init.h>
 #include <linux/sched.h>
 #include <linux/mm.h>
 #include <linux/pm.h>