* [PATCH] module: remove some duplicated includes
@ 2018-11-26 14:21 Yangtao Li
2018-11-27 12:00 ` Jessica Yu
0 siblings, 1 reply; 2+ messages in thread
From: Yangtao Li @ 2018-11-26 14:21 UTC (permalink / raw)
To: jeyu; +Cc: linux-kernel, Yangtao Li
We include elf.h twice in module.c. It's unnecessary.
hence just remove them.
Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
kernel/module.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/kernel/module.c b/kernel/module.c
index 49a405891587..438641fc4096 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -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>
--
2.17.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] module: remove some duplicated includes
2018-11-26 14:21 [PATCH] module: remove some duplicated includes Yangtao Li
@ 2018-11-27 12:00 ` Jessica Yu
0 siblings, 0 replies; 2+ messages in thread
From: Jessica Yu @ 2018-11-27 12:00 UTC (permalink / raw)
To: Yangtao Li; +Cc: linux-kernel
+++ Yangtao Li [26/11/18 09:21 -0500]:
>We include elf.h twice in module.c. It's unnecessary.
>hence just remove them.
>
>Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
>---
> kernel/module.c | 1 -
> 1 file changed, 1 deletion(-)
>
>diff --git a/kernel/module.c b/kernel/module.c
>index 49a405891587..438641fc4096 100644
>--- a/kernel/module.c
>+++ b/kernel/module.c
>@@ -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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-11-27 12:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-26 14:21 [PATCH] module: remove some duplicated includes Yangtao Li
2018-11-27 12:00 ` Jessica Yu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).