Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1577669 > unrolled thread

[PATCH -next] sched/x86: Remove duplicated include from itmt.c

Started byWei Yongjun <weiyj.lk@gmail.com>
First post2017-02-09 16:20 +0100
Last post2017-02-10 09:20 +0100
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH -next] sched/x86: Remove duplicated include from itmt.c Wei Yongjun <weiyj.lk@gmail.com> - 2017-02-09 16:20 +0100
    Re: [PATCH -next] sched/x86: Remove duplicated include from itmt.c Tim Chen <tim.c.chen@linux.intel.com> - 2017-02-09 19:10 +0100
    Re: [PATCH -next] sched/x86: Remove duplicated include from itmt.c Ingo Molnar <mingo@kernel.org> - 2017-02-10 09:20 +0100

#1577669 — [PATCH -next] sched/x86: Remove duplicated include from itmt.c

FromWei Yongjun <weiyj.lk@gmail.com>
Date2017-02-09 16:20 +0100
Subject[PATCH -next] sched/x86: Remove duplicated include from itmt.c
Message-ID<t8YFQ-7Mt-1@gated-at.bofh.it>
From: Wei Yongjun <weiyongjun1@huawei.com>

Remove duplicated include.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 arch/x86/kernel/itmt.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/x86/kernel/itmt.c b/arch/x86/kernel/itmt.c
index f73f475..b5ccc9b 100644
--- a/arch/x86/kernel/itmt.c
+++ b/arch/x86/kernel/itmt.c
@@ -20,7 +20,6 @@
  * frequency under ITMT.
  */
 
-#include <linux/sched.h>
 #include <linux/cpumask.h>
 #include <linux/cpuset.h>
 #include <linux/mutex.h>

[toc] | [next] | [standalone]


#1577829

FromTim Chen <tim.c.chen@linux.intel.com>
Date2017-02-09 19:10 +0100
Message-ID<t91kl-11Q-3@gated-at.bofh.it>
In reply to#1577669
On Thu, 2017-02-09 at 15:15 +0000, Wei Yongjun wrote:
> From: Wei Yongjun <weiyongjun1@huawei.com>
> 
> Remove duplicated include.

Acked-by: Tim Chen <tim.c.chen@linux.intel.com>

> 
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
>  arch/x86/kernel/itmt.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/arch/x86/kernel/itmt.c b/arch/x86/kernel/itmt.c
> index f73f475..b5ccc9b 100644
> --- a/arch/x86/kernel/itmt.c
> +++ b/arch/x86/kernel/itmt.c
> @@ -20,7 +20,6 @@
>   * frequency under ITMT.
>   */
>  
> -#include <linux/sched.h>
>  #include <linux/cpumask.h>
>  #include <linux/cpuset.h>
>  #include <linux/mutex.h>
> 
> 
> 

[toc] | [prev] | [next] | [standalone]


#1578268

FromIngo Molnar <mingo@kernel.org>
Date2017-02-10 09:20 +0100
Message-ID<t9eAW-To-15@gated-at.bofh.it>
In reply to#1577669
* Wei Yongjun <weiyj.lk@gmail.com> wrote:

> From: Wei Yongjun <weiyongjun1@huawei.com>
> 
> Remove duplicated include.
> 
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
>  arch/x86/kernel/itmt.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/arch/x86/kernel/itmt.c b/arch/x86/kernel/itmt.c
> index f73f475..b5ccc9b 100644
> --- a/arch/x86/kernel/itmt.c
> +++ b/arch/x86/kernel/itmt.c
> @@ -20,7 +20,6 @@
>   * frequency under ITMT.
>   */
>  
> -#include <linux/sched.h>
>  #include <linux/cpumask.h>
>  #include <linux/cpuset.h>
>  #include <linux/mutex.h>

Firstly, we generally use 'larger' headers first, i.e. sched.h, mm.h, etc.

Secondly, this:

#include <linux/sched.h>
#include <linux/cpumask.h>
#include <linux/cpuset.h>
#include <linux/mutex.h>
#include <linux/sysctl.h>
#include <linux/nodemask.h>

... can probably be further reduced, because for example sched.h already includes 
some of these headers.

I.e. instead of a mindless single liner that helps no-one, try to improve the code 
for real...

Thanks,

	Ingo

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web