Skip to contentSkip to conversation

module: remove some duplicated includes

PATCH In review Yangtao Li 2 participants 2 messages Nov 26, 2018 – Nov 27, 2018

lore
Share & tools
lore

Yangtao Li

author
#0 lore raw

PATCH 1/1 module: remove some duplicated includes

We include elf.h twice in module.c. It's unnecessary. hence just remove them.

---
 kernel/module.c | 1 -
 1 file changed, 1 deletion(-)
kernel/module.c +0 -1
index 49a405891587..438641fc4096 100644
@@ -28,7 +28,6 @@
 #include <linux/kernel.h>
 #include <linux/slab.h>
 #include <linux/vmalloc.h>
-#include <linux/elf.h>
 #include <linux/proc_fs.h>
 #include <linux/security.h>
 #include <linux/seq_file.h>
Signature · 1 line
2.17.0
#1 lore raw

+++ Yangtao Li [26/11/18 09:21 -0500]:

Quoted 13 lines

We include elf.h twice in module.c. It's unnecessary. hence just remove them.

---
kernel/module.c | 1 -

1 file changed, 1 deletion(-)
kernel/module.c +0 -0
index 49a405891587..438641fc4096 100644

kernel/module.c line 33

Quoted 7 lines
kernel/module.c +0 -1
@@ -28,7 +28,6 @@
 #include <linux/kernel.h>
 #include <linux/slab.h>
 #include <linux/vmalloc.h>
-#include <linux/elf.h>
 #include <linux/proc_fs.h>
 #include <linux/security.h>
 #include <linux/seq_file.h>

elf.h is not _directly_ included twice in module.c, although it is included by other header files that module.c pulls in. I'd rather keep things as-is, since we shouldn't depend on other header files to pull in the headers we want. I think it's better to keep the explicit dependence/inclusion of elf.h in module.c.

Thanks,

Jessica