Skip to contentSkip to conversation

sched/headers: remove duplicate included header

PATCH Superseded 晏艳(采苓) 2 participants 4 messages May 6, 2023 – May 22, 2023 Scheduler

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sched/headers: remove duplicate included header

linux/psi.h is included more than once.

---
 kernel/sched/build_utility.c | 1 -
 1 file changed, 1 deletion(-)
kernel/sched/build_utility.c +0 -1
index 99bdd96f454f..80a3df49ab47 100644
@@ -34,7 +34,6 @@
 #include <linux/nospec.h>
 #include <linux/proc_fs.h>
 #include <linux/psi.h>
-#include <linux/psi.h>
 #include <linux/ptrace_api.h>
 #include <linux/sched_clock.h>
 #include <linux/security.h>
Signature · 1 line
2.32.0.3.g01195cf9f
#1 lore raw

Ping.

It seems that removing the two same included lines is ok. Because the following "sched.h" also includes psi.h.

Any comments?

Thanks,

-Yan Yan

Quoted 19 lines · 晏艳(采苓)

linux/psi.h is included more than once.

---
  kernel/sched/build_utility.c | 1 -
  1 file changed, 1 deletion(-)
kernel/sched/build_utility.c +0 -1
index 99bdd96f454f..80a3df49ab47 100644
@@ -34,7 +34,6 @@
  #include <linux/nospec.h>
  #include <linux/proc_fs.h>
  #include <linux/psi.h>
-#include <linux/psi.h>
  #include <linux/ptrace_api.h>
  #include <linux/sched_clock.h>
  #include <linux/security.h>
#2 lore raw

Ping, any comments?

thanks,

-Yan Yan

Quoted 30 lines · Yan Yan

Ping.

It seems that removing the two same included lines is ok. Because the following "sched.h" also includes psi.h.

Any comments?

Thanks,

-Yan Yan

Quoted 19 lines · 晏艳(采苓)

linux/psi.h is included more than once.

---
  kernel/sched/build_utility.c | 1 -

  1 file changed, 1 deletion(-)
kernel/sched/build_utility.c +0 -1
index 99bdd96f454f..80a3df49ab47 100644
@@ -34,7 +34,6 @@
   #include <linux/nospec.h>
   #include <linux/proc_fs.h>
   #include <linux/psi.h>
-#include <linux/psi.h>
   #include <linux/ptrace_api.h>
   #include <linux/sched_clock.h>
   #include <linux/security.h>
#3 lore raw

Le 22/05/2023 à 04:26, Yan Yan(cailing) a écrit :

Quoted 12 lines

Ping, any comments?

thanks,

-Yan Yan

Quoted 5 lines · Yan Yan

Ping.

It seems that removing the two same included lines is ok. Because the following "sched.h" also includes psi.h.

Any comments?

FWIW, yes, looks good.

If you want to ga that way, their are some other potential removal candidates in build_utility.c:

linux/sched/mm.h

linux/cpufreq.h
linux/ctype.h
linux/proc_fs.h
linux/spinlock_api.h
linux/wait_api.h
linux/workqueue_api.h

CJ

Quoted 26 lines
Quoted 25 lines

Thanks,

-Yan Yan

Quoted 19 lines · 晏艳(采苓)

linux/psi.h is included more than once.

---
  kernel/sched/build_utility.c | 1 -

  1 file changed, 1 deletion(-)
kernel/sched/build_utility.c +0 -1
index 99bdd96f454f..80a3df49ab47 100644
@@ -34,7 +34,6 @@
   #include <linux/nospec.h>
   #include <linux/proc_fs.h>
   #include <linux/psi.h>
-#include <linux/psi.h>
   #include <linux/ptrace_api.h>
   #include <linux/sched_clock.h>
   #include <linux/security.h>