* [PATCH-cgroup] cgroup/cpuset: Move cpu.h include to cpuset-internal.h
@ 2024-08-31 13:57 Waiman Long
2024-08-31 15:52 ` Tejun Heo
2024-09-02 0:56 ` Chen Ridong
0 siblings, 2 replies; 3+ messages in thread
From: Waiman Long @ 2024-08-31 13:57 UTC (permalink / raw)
To: Tejun Heo, Zefan Li, Johannes Weiner, Michal Koutný
Cc: cgroups, linux-kernel, Chen Ridong, Waiman Long,
kernel test robot
The 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.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202408311612.mQTuO946-lkp@intel.com/
Fixes: dd46bd00ab4c ("cgroup/cpuset: move relax_domain_level to cpuset-v1.c")
Signed-off-by: Waiman Long <longman@redhat.com>
---
kernel/cgroup/cpuset-internal.h | 7 ++++---
kernel/cgroup/cpuset.c | 1 -
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/kernel/cgroup/cpuset-internal.h b/kernel/cgroup/cpuset-internal.h
index 8c113d46ddd3..976a8bc3ff60 100644
--- a/kernel/cgroup/cpuset-internal.h
+++ b/kernel/cgroup/cpuset-internal.h
@@ -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. */
diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c
index 13016ad284a1..a4dd285cdf39 100644
--- a/kernel/cgroup/cpuset.c
+++ b/kernel/cgroup/cpuset.c
@@ -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>
--
2.43.5
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH-cgroup] cgroup/cpuset: Move cpu.h include to cpuset-internal.h
2024-08-31 13:57 [PATCH-cgroup] cgroup/cpuset: Move cpu.h include to cpuset-internal.h Waiman Long
@ 2024-08-31 15:52 ` Tejun Heo
2024-09-02 0:56 ` Chen Ridong
1 sibling, 0 replies; 3+ messages in thread
From: Tejun Heo @ 2024-08-31 15:52 UTC (permalink / raw)
To: Waiman Long
Cc: Zefan Li, Johannes Weiner, Michal Koutný, cgroups,
linux-kernel, Chen Ridong, kernel test robot
On Sat, Aug 31, 2024 at 09:57:03AM -0400, Waiman Long wrote:
> The 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.
>
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202408311612.mQTuO946-lkp@intel.com/
> Fixes: dd46bd00ab4c ("cgroup/cpuset: move relax_domain_level to cpuset-v1.c")
> Signed-off-by: Waiman Long <longman@redhat.com>
Applied to cgroup/for-6.12.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH-cgroup] cgroup/cpuset: Move cpu.h include to cpuset-internal.h
2024-08-31 13:57 [PATCH-cgroup] cgroup/cpuset: Move cpu.h include to cpuset-internal.h Waiman Long
2024-08-31 15:52 ` Tejun Heo
@ 2024-09-02 0:56 ` Chen Ridong
1 sibling, 0 replies; 3+ messages in thread
From: Chen Ridong @ 2024-09-02 0:56 UTC (permalink / raw)
To: Waiman Long, Tejun Heo, Zefan Li, Johannes Weiner,
Michal Koutný
Cc: cgroups, linux-kernel, Chen Ridong, kernel test robot
On 2024/8/31 21:57, Waiman Long wrote:
> The 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.
>
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202408311612.mQTuO946-lkp@intel.com/
> Fixes: dd46bd00ab4c ("cgroup/cpuset: move relax_domain_level to cpuset-v1.c")
> Signed-off-by: Waiman Long <longman@redhat.com>
> ---
> kernel/cgroup/cpuset-internal.h | 7 ++++---
> kernel/cgroup/cpuset.c | 1 -
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/kernel/cgroup/cpuset-internal.h b/kernel/cgroup/cpuset-internal.h
> index 8c113d46ddd3..976a8bc3ff60 100644
> --- a/kernel/cgroup/cpuset-internal.h
> +++ b/kernel/cgroup/cpuset-internal.h
> @@ -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. */
>
> diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c
> index 13016ad284a1..a4dd285cdf39 100644
> --- a/kernel/cgroup/cpuset.c
> +++ b/kernel/cgroup/cpuset.c
> @@ -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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-09-02 0:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-31 13:57 [PATCH-cgroup] cgroup/cpuset: Move cpu.h include to cpuset-internal.h Waiman Long
2024-08-31 15:52 ` Tejun Heo
2024-09-02 0:56 ` Chen Ridong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox