Skip to contentSkip to conversation

sched/x86: Remove duplicated include from itmt.c

PATCH In review Wei Yongjun 3 participants 3 messages Feb 9, 2017 – Feb 10, 2017 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sched/x86: Remove duplicated include from itmt.c

From: Wei Yongjun <[email protected]>

Remove duplicated include.

---
 arch/x86/kernel/itmt.c | 1 -
 1 file changed, 1 deletion(-)
arch/x86/kernel/itmt.c +0 -1
index f73f475..b5ccc9b 100644
@@ -20,7 +20,6 @@
  * frequency under ITMT.
  */
 
-#include <linux/sched.h>
 #include <linux/cpumask.h>
 #include <linux/cpuset.h>
 #include <linux/mutex.h>
Acked-by on v1 1/1
#1 lore raw
Quoted 3 lines · Wei Yongjun

From: Wei Yongjun <[email protected]>

Remove duplicated include.

Quoted 21 lines

---
 arch/x86/kernel/itmt.c | 1 -

 1 file changed, 1 deletion(-)
arch/x86/kernel/itmt.c +0 -0
index f73f475..b5ccc9b 100644
@@ -20,7 +20,6 @@
   * frequency under ITMT.
   */


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

#2 lore raw
In reply to Wei Yongjun
Quoted 14 lines · Wei Yongjun

From: Wei Yongjun <[email protected]>

Remove duplicated include.

---
 arch/x86/kernel/itmt.c | 1 -
 1 file changed, 1 deletion(-)
arch/x86/kernel/itmt.c +0 -0
index f73f475..b5ccc9b 100644

arch/x86/kernel/itmt.c line 25

Quoted 7 lines
arch/x86/kernel/itmt.c +0 -1
@@ -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