Skip to content

Commit d321796

Browse files
Paul GortmakerMartin Schwidefsky
authored andcommitted
s390: Audit and remove any remaining 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 change instance for the presence of either and replace as needed. An instance where module_param was used without moduleparam.h was also fixed, as well as implicit use of ptrace.h and string.h headers. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
1 parent ff24b07 commit d321796

6 files changed

Lines changed: 7 additions & 5 deletions

File tree

‎arch/s390/include/asm/livepatch.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#ifndef ASM_LIVEPATCH_H
1818
#define ASM_LIVEPATCH_H
1919

20-
#include <linux/module.h>
20+
#include <asm/ptrace.h>
2121

2222
static inline int klp_check_compiler_support(void)
2323
{

‎arch/s390/kvm/kvm-s390.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include <linux/kvm_host.h>
2424
#include <linux/mman.h>
2525
#include <linux/module.h>
26+
#include <linux/moduleparam.h>
2627
#include <linux/random.h>
2728
#include <linux/slab.h>
2829
#include <linux/timer.h>

‎arch/s390/lib/delay.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#include <linux/sched.h>
1010
#include <linux/delay.h>
1111
#include <linux/timex.h>
12-
#include <linux/module.h>
12+
#include <linux/export.h>
1313
#include <linux/irqflags.h>
1414
#include <linux/interrupt.h>
1515
#include <linux/irq.h>

‎arch/s390/lib/spinlock.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77

88
#include <linux/types.h>
9-
#include <linux/module.h>
9+
#include <linux/export.h>
1010
#include <linux/spinlock.h>
1111
#include <linux/init.h>
1212
#include <linux/smp.h>

‎arch/s390/lib/string.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
#define IN_ARCH_STRING_C 1
1010

1111
#include <linux/types.h>
12-
#include <linux/module.h>
12+
#include <linux/string.h>
13+
#include <linux/export.h>
1314

1415
/*
1516
* Helper functions to find the end of a string

‎arch/s390/lib/xor.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77

88
#include <linux/types.h>
9-
#include <linux/module.h>
9+
#include <linux/export.h>
1010
#include <linux/raid/xor.h>
1111

1212
static void xor_xc_2(unsigned long bytes, unsigned long *p1, unsigned long *p2)

0 commit comments

Comments
 (0)