cgroup/cpuset: Move cpu.h include to cpuset-internal.h
Subsystems (2)
Waiman Long
maintainerThe newly created cpuset-v1.c file uses cpus_read_lock/unlock() functions which are defined in cpu.h but not included in cpuset-internal.h yet leading to compilation error under certain kernel configurations. Fix it by moving the cpu.h include from cpuset.c to cpuset-internal.h. While at it, sort the include files in alphabetic order.
--- kernel/cgroup/cpuset-internal.h | 7 ++++--- kernel/cgroup/cpuset.c | 1 - 2 files changed, 4 insertions(+), 4 deletions(-)
kernel/cgroup/cpuset-internal.h +4 -3
@@ -3,11 +3,12 @@#ifndef __CPUSET_INTERNAL_H#define __CPUSET_INTERNAL_H -#include <linux/union_find.h> +#include <linux/cgroup.h> +#include <linux/cpu.h> #include <linux/cpumask.h> -#include <linux/spinlock.h> #include <linux/cpuset.h> -#include <linux/cgroup.h> +#include <linux/spinlock.h> +#include <linux/union_find.h> /* See "Frequency meter" comments, below. */
kernel/cgroup/cpuset.c +0 -1
@@ -24,7 +24,6 @@#include "cgroup-internal.h" #include "cpuset-internal.h" -#include <linux/cpu.h> #include <linux/init.h> #include <linux/interrupt.h> #include <linux/kernel.h>
Signature · 1 line
2.43.5
Quoted 10 lines · Waiman Long
The newly created
cpuset-v1.cfile uses cpus_read_lock/unlock() functions which are defined incpu.hbut not included incpuset-internal.hyet leading to compilation error under certain kernel configurations. Fix it by moving thecpu.hinclude fromcpuset.ctocpuset-internal.h. While at it, sort the include files in alphabetic order.Reported-by kernel test robot <[email protected]>Fixes dd46bd00ab4c ("cgroup/cpuset: move relax_domain_level to cpuset-v1.c")Signed-off-by Waiman Long <[email protected]>
Applied to cgroup/for-6.12.
Thanks.
Signature · 1 line
tejun
Quoted 40 lines · Waiman Long
The newly created
cpuset-v1.cfile uses cpus_read_lock/unlock() functions which are defined incpu.hbut not included incpuset-internal.hyet leading to compilation error under certain kernel configurations. Fix it by moving thecpu.hinclude fromcpuset.ctocpuset-internal.h. While at it, sort the include files in alphabetic order.Reported-by kernel test robot <[email protected]>Fixes dd46bd00ab4c ("cgroup/cpuset: move relax_domain_level to cpuset-v1.c")Signed-off-by Waiman Long <[email protected]>--- kernel/cgroup/cpuset-internal.h | 7 ++++--- kernel/cgroup/cpuset.c | 1 - 2 files changed, 4 insertions(+), 4 deletions(-)kernel/cgroup/cpuset-internal.h +4
-3@@ -3,11 +3,12 @@#ifndef __CPUSET_INTERNAL_H#define __CPUSET_INTERNAL_H -#include <linux/union_find.h> +#include <linux/cgroup.h> +#include <linux/cpu.h> #include <linux/cpumask.h> -#include <linux/spinlock.h> #include <linux/cpuset.h> -#include <linux/cgroup.h> +#include <linux/spinlock.h> +#include <linux/union_find.h> /* See "Frequency meter" comments, below. */ kernel/cgroup/cpuset.c +0
-0
kernel/cgroup/cpuset.c line 29
Quoted 7 lines
kernel/cgroup/cpuset.c +0
-1@@ -24,7 +24,6 @@#include "cgroup-internal.h" #include "cpuset-internal.h" -#include <linux/cpu.h> #include <linux/init.h> #include <linux/interrupt.h> #include <linux/kernel.h>
Thank you for fixing this.
Best regards,
Ridong