linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHv2] kernel: kexec_file: remove some duplicated include file
@ 2018-09-21  2:48 zhong jiang
  2018-09-21  3:02 ` Baoquan He
  2018-09-21  5:21 ` Bhupesh Sharma
  0 siblings, 2 replies; 5+ messages in thread
From: zhong jiang @ 2018-09-21  2:48 UTC (permalink / raw)
  To: bhe; +Cc: ebiederm, kexec, linux-kernel

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

Signed-off-by: zhong jiang <zhongjiang@huawei.com>
---
 kernel/kexec_file.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/kernel/kexec_file.c b/kernel/kexec_file.c
index c6a3b68..35cf0ad 100644
--- a/kernel/kexec_file.c
+++ b/kernel/kexec_file.c
@@ -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"
-- 
1.7.12.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCHv2] kernel: kexec_file: remove some duplicated include file
  2018-09-21  2:48 [PATCHv2] kernel: kexec_file: remove some duplicated include file zhong jiang
@ 2018-09-21  3:02 ` Baoquan He
  2018-09-21  3:07   ` zhong jiang
  2018-09-21  5:21 ` Bhupesh Sharma
  1 sibling, 1 reply; 5+ messages in thread
From: Baoquan He @ 2018-09-21  3:02 UTC (permalink / raw)
  To: zhong jiang, akpm; +Cc: ebiederm, kexec, linux-kernel

On 09/21/18 at 10:48am, zhong jiang wrote:
> We include kexec.h and slab.h twice in kexec_file.c. It's unnecessary.
> hence just remove them.
> 
> Signed-off-by: zhong jiang <zhongjiang@huawei.com>


ACK

> ---
>  kernel/kexec_file.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/kernel/kexec_file.c b/kernel/kexec_file.c
> index c6a3b68..35cf0ad 100644
> --- a/kernel/kexec_file.c
> +++ b/kernel/kexec_file.c
> @@ -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"
> -- 
> 1.7.12.4
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCHv2] kernel: kexec_file: remove some duplicated include file
  2018-09-21  3:02 ` Baoquan He
@ 2018-09-21  3:07   ` zhong jiang
  0 siblings, 0 replies; 5+ messages in thread
From: zhong jiang @ 2018-09-21  3:07 UTC (permalink / raw)
  To: Baoquan He; +Cc: akpm, ebiederm, kexec, linux-kernel

On 2018/9/21 11:02, Baoquan He wrote:
> On 09/21/18 at 10:48am, zhong jiang wrote:
>> We include kexec.h and slab.h twice in kexec_file.c. It's unnecessary.
>> hence just remove them.
>>
>> Signed-off-by: zhong jiang <zhongjiang@huawei.com>
>
> ACK
Thanks :-)
>> ---
>>  kernel/kexec_file.c | 2 --
>>  1 file changed, 2 deletions(-)
>>
>> diff --git a/kernel/kexec_file.c b/kernel/kexec_file.c
>> index c6a3b68..35cf0ad 100644
>> --- a/kernel/kexec_file.c
>> +++ b/kernel/kexec_file.c
>> @@ -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"
>> -- 
>> 1.7.12.4
>>
> .
>



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCHv2] kernel: kexec_file: remove some duplicated include file
  2018-09-21  2:48 [PATCHv2] kernel: kexec_file: remove some duplicated include file zhong jiang
  2018-09-21  3:02 ` Baoquan He
@ 2018-09-21  5:21 ` Bhupesh Sharma
  2018-09-21  5:33   ` zhong jiang
  1 sibling, 1 reply; 5+ messages in thread
From: Bhupesh Sharma @ 2018-09-21  5:21 UTC (permalink / raw)
  To: zhong jiang
  Cc: Baoquan He, kexec mailing list, Eric Biederman,
	Linux Kernel Mailing List

Hi,

On Fri, Sep 21, 2018 at 8:18 AM, zhong jiang <zhongjiang@huawei.com> wrote:
> We include kexec.h and slab.h twice in kexec_file.c. It's unnecessary.
> hence just remove them.
>
> Signed-off-by: zhong jiang <zhongjiang@huawei.com>
> ---
>  kernel/kexec_file.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/kernel/kexec_file.c b/kernel/kexec_file.c
> index c6a3b68..35cf0ad 100644
> --- a/kernel/kexec_file.c
> +++ b/kernel/kexec_file.c
> @@ -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"
> --
> 1.7.12.4
>

Nice catch.
Reviewed-by: Bhupesh Sharma <bhsharma@redhat.com>

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCHv2] kernel: kexec_file: remove some duplicated include file
  2018-09-21  5:21 ` Bhupesh Sharma
@ 2018-09-21  5:33   ` zhong jiang
  0 siblings, 0 replies; 5+ messages in thread
From: zhong jiang @ 2018-09-21  5:33 UTC (permalink / raw)
  To: Bhupesh Sharma
  Cc: Baoquan He, kexec mailing list, Eric Biederman,
	Linux Kernel Mailing List

On 2018/9/21 13:21, Bhupesh Sharma wrote:
> Hi,
>
> On Fri, Sep 21, 2018 at 8:18 AM, zhong jiang <zhongjiang@huawei.com> wrote:
>> We include kexec.h and slab.h twice in kexec_file.c. It's unnecessary.
>> hence just remove them.
>>
>> Signed-off-by: zhong jiang <zhongjiang@huawei.com>
>> ---
>>  kernel/kexec_file.c | 2 --
>>  1 file changed, 2 deletions(-)
>>
>> diff --git a/kernel/kexec_file.c b/kernel/kexec_file.c
>> index c6a3b68..35cf0ad 100644
>> --- a/kernel/kexec_file.c
>> +++ b/kernel/kexec_file.c
>> @@ -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"
>> --
>> 1.7.12.4
>>
> Nice catch.
> Reviewed-by: Bhupesh Sharma <bhsharma@redhat.com>
>
> 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
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




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-09-21  5:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-21  2:48 [PATCHv2] kernel: kexec_file: remove some duplicated include file zhong jiang
2018-09-21  3:02 ` Baoquan He
2018-09-21  3:07   ` zhong jiang
2018-09-21  5:21 ` Bhupesh Sharma
2018-09-21  5:33   ` zhong jiang

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).