Skip to contentSkip to conversation

kernel: kexec_file: remove some duplicated include file

PATCH In review zhong jiang 3 participants 5 messages Sep 21, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 kernel: kexec_file: remove some duplicated include file

We include kexec.h and slab.h twice in kexec_file.c. It's unnecessary. hence just remove them.

---
 kernel/kexec_file.c | 2 --
 1 file changed, 2 deletions(-)
kernel/kexec_file.c +0 -2
index c6a3b68..35cf0ad 100644
@@ -25,8 +25,6 @@
 #include <linux/elf.h>
 #include <linux/elfcore.h>
 #include <linux/kernel.h>
-#include <linux/kexec.h>
-#include <linux/slab.h>
 #include <linux/syscalls.h>
 #include <linux/vmalloc.h>
 #include "kexec_internal.h"
Signature · 7 lines
1.7.12.4


_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
#1 lore raw
Quoted 4 lines · zhong jiang

We include kexec.h and slab.h twice in kexec_file.c. It's unnecessary. hence just remove them.

ACK

Quoted 20 lines
---
 kernel/kexec_file.c | 2 --
 1 file changed, 2 deletions(-)
kernel/kexec_file.c +0 -2
index c6a3b68..35cf0ad 100644
@@ -25,8 +25,6 @@
 #include <linux/elf.h>
 #include <linux/elfcore.h>
 #include <linux/kernel.h>
-#include <linux/kexec.h>
-#include <linux/slab.h>
 #include <linux/syscalls.h>
 #include <linux/vmalloc.h>
 #include "kexec_internal.h"
Signature · 1 line
1.7.12.4
#2 lore raw
Quoted 7 lines · Baoquan He
Quoted 4 lines · zhong jiang

We include kexec.h and slab.h twice in kexec_file.c. It's unnecessary. hence just remove them.

ACK

Thanks :-)

Quoted 22 lines
Quoted 20 lines
---
 kernel/kexec_file.c | 2 --
 1 file changed, 2 deletions(-)
kernel/kexec_file.c +0 -2
index c6a3b68..35cf0ad 100644
@@ -25,8 +25,6 @@
 #include <linux/elf.h>
 #include <linux/elfcore.h>
 #include <linux/kernel.h>
-#include <linux/kexec.h>
-#include <linux/slab.h>
 #include <linux/syscalls.h>
 #include <linux/vmalloc.h>
 #include "kexec_internal.h"
Signature · 1 line
1.7.12.4

.

Reviewed-by on v2 1/1
#3 lore raw
In reply to zhong jiang

Hi,

Quoted 22 lines · zhong jiang

We include kexec.h and slab.h twice in kexec_file.c. It's unnecessary. hence just remove them.

---
 kernel/kexec_file.c | 2 --
 1 file changed, 2 deletions(-)
kernel/kexec_file.c +0 -3
index c6a3b68..35cf0ad 100644
@@ -25,8 +25,6 @@
 #include <linux/elf.h>
 #include <linux/elfcore.h>
 #include <linux/kernel.h>
-#include <linux/kexec.h>
-#include <linux/slab.h>
 #include <linux/syscalls.h>
 #include <linux/vmalloc.h>
 #include "kexec_internal.h"
--
Quoted 2 lines

1.7.12.4

Nice catch.

BTW while we are at it, can you also send out a separate patch to list the include files in this file (i.e. kexec_file.c) alphabetically (similar to other linux source files - see
<https://patchwork.kernel.org/patch/10258279/> for example). Something like:

#include <crypto/hash.h>
#include <crypto/sha.h>
#include <linux/capability.h>
#include <linux/elf.h>
#include <linux/elfcore.h>
#include <linux/file.h>
#include <linux/fs.h>
#include <linux/ima.h>
#include <linux/kernel.h>
#include <linux/kexec.h>
#include <linux/list.h>
#include <linux/mm.h>
#include <linux/mutex.h>
#include <linux/slab.h>
#include <linux/syscalls.h>
#include <linux/vmalloc.h>
#include "kexec_internal.h"

This will improve readability and also reduce similar instances of include files being added twice in this source file in future.

Thanks,
Bhupesh

#4 lore raw
Quoted 54 lines · Bhupesh Sharma

Hi,

Quoted 22 lines · zhong jiang

We include kexec.h and slab.h twice in kexec_file.c. It's unnecessary. hence just remove them.

---
 kernel/kexec_file.c | 2 --
 1 file changed, 2 deletions(-)
kernel/kexec_file.c +0 -3
index c6a3b68..35cf0ad 100644
@@ -25,8 +25,6 @@
 #include <linux/elf.h>
 #include <linux/elfcore.h>
 #include <linux/kernel.h>
-#include <linux/kexec.h>
-#include <linux/slab.h>
 #include <linux/syscalls.h>
 #include <linux/vmalloc.h>
 #include "kexec_internal.h"
--
Quoted 2 lines

1.7.12.4

Nice catch.

BTW while we are at it, can you also send out a separate patch to list the include files in this file (i.e. kexec_file.c) alphabetically (similar to other linux source files - see
<https://patchwork.kernel.org/patch/10258279/> for example). Something like:

#include <crypto/hash.h>
#include <crypto/sha.h>
#include <linux/capability.h>
#include <linux/elf.h>
#include <linux/elfcore.h>
#include <linux/file.h>
#include <linux/fs.h>
#include <linux/ima.h>
#include <linux/kernel.h>
#include <linux/kexec.h>
#include <linux/list.h>
#include <linux/mm.h>
#include <linux/mutex.h>
#include <linux/slab.h>
#include <linux/syscalls.h>
#include <linux/vmalloc.h>
#include "kexec_internal.h"

Quoted 5 lines

This will improve readability and also reduce similar instances of include files being added twice in this source file in future.

Thanks,
Bhupesh

Thank you for suggestion, I do not know whether all of maintainer care about this or not. Anyhow I will try it.

Sincerely,
zhong jiang