[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20170210081650.GB17987@gmail.com>
Date: Fri, 10 Feb 2017 09:16:50 +0100
From: Ingo Molnar <mingo@...nel.org>
To: Wei Yongjun <weiyj.lk@...il.com>
Cc: Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>,
Tim Chen <tim.c.chen@...ux.intel.com>,
Wei Yongjun <weiyongjun1@...wei.com>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH -next] sched/x86: Remove duplicated include from itmt.c
* Wei Yongjun <weiyj.lk@...il.com> wrote:
> From: Wei Yongjun <weiyongjun1@...wei.com>
>
> Remove duplicated include.
>
> Signed-off-by: Wei Yongjun <weiyongjun1@...wei.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
Powered by blists - more mailing lists