x86/lib: 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. Build testing revealed a couple implicit header usage issues that were fixed. 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-5-paul.gortmaker@windriver.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
parent
186f43608a
commit
e683014c21
|
@ -1,5 +1,5 @@
|
|||
#include <linux/smp.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/export.h>
|
||||
|
||||
static void __wbinvd(void *dummy)
|
||||
{
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include <linux/module.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/export.h>
|
||||
|
||||
unsigned int x86_family(unsigned int sig)
|
||||
{
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/compiler.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/export.h>
|
||||
#include <asm/checksum.h>
|
||||
|
||||
static inline unsigned short from32to16(unsigned a)
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* Wrappers of assembly checksum functions for x86-64.
|
||||
*/
|
||||
#include <asm/checksum.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/export.h>
|
||||
#include <asm/smap.h>
|
||||
|
||||
/**
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
* we have to worry about.
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/export.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/timex.h>
|
||||
#include <linux/preempt.h>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include <linux/string.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/export.h>
|
||||
|
||||
#undef memcpy
|
||||
#undef memset
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
*/
|
||||
#include <linux/hardirq.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/export.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <linux/module.h>
|
||||
#include <linux/export.h>
|
||||
#include <asm/msr.h>
|
||||
|
||||
EXPORT_SYMBOL(rdmsr_safe_regs);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <linux/module.h>
|
||||
#include <linux/export.h>
|
||||
#include <linux/preempt.h>
|
||||
#include <linux/smp.h>
|
||||
#include <asm/msr.h>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include <linux/module.h>
|
||||
#include <linux/export.h>
|
||||
#include <linux/percpu.h>
|
||||
#include <linux/preempt.h>
|
||||
#include <asm/msr.h>
|
||||
#define CREATE_TRACE_POINTS
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/string.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/export.h>
|
||||
|
||||
#ifdef __HAVE_ARCH_STRCPY
|
||||
char *strcpy(char *dest, const char *src)
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/highmem.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/export.h>
|
||||
|
||||
#include <asm/word-at-a-time.h>
|
||||
#include <linux/sched.h>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include <linux/mm.h>
|
||||
#include <linux/highmem.h>
|
||||
#include <linux/blkdev.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/export.h>
|
||||
#include <linux/backing-dev.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <asm/uaccess.h>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* Copyright 1997 Linus Torvalds
|
||||
* Copyright 2002 Andi Kleen <ak@suse.de>
|
||||
*/
|
||||
#include <linux/module.h>
|
||||
#include <linux/export.h>
|
||||
#include <asm/uaccess.h>
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue