cpumask: Don't use "proxy" headers
Subsystems (2)
PATCH 1/1 cpumask: Don't use "proxy" headers
Update header inclusions to follow IWYU (Include What You Use) principle.
Note that kernel.h is discouraged to be included as it's written at the top of that file.
---
Not fully compile tested, might give some compilation errors
arch/x86/include/asm/cpumask.h | 2 ++ include/linux/cpumask.h | 12 +++++++----- 2 files changed, 9 insertions(+), 5 deletions(-)
arch/x86/include/asm/cpumask.h +2 -0
@@ -2,6 +2,8 @@#ifndef _ASM_X86_CPUMASK_H#define _ASM_X86_CPUMASK_H#ifndef __ASSEMBLER__ + +#include <linux/compiler.h> #include <linux/cpumask.h> extern void setup_cpu_local_masks (void );
include/linux/cpumask.h +7 -5
@@ -7,14 +7,16 @@* set of CPUs in a system, one bit position per CPU number. In general, * only nr_cpu_ids (<= NR_CPUS) bits are valid. */ -#include <linux/cleanup.h> -#include <linux/kernel.h> -#include <linux/bitmap.h> -#include <linux/cpumask_types.h> #include <linux/atomic.h> -#include <linux/bug.h> +#include <linux/bitmap.h> +#include <linux/cleanup.h> +#include <linux/cpumask_types.h> #include <linux/gfp_types.h> #include <linux/numa.h> +#include <linux/threads.h> +#include <linux/types.h> + +#include <asm/bug.h> /** * cpumask_pr_args - printf args to output a cpumask
Signature · 1 line
2.50.1
Yury Norov
maintainerQuoted 33 lines · Andy Shevchenko
Update header inclusions to follow IWYU (Include What You Use) principle.
Note that
kernel.his discouraged to be included as it's written at the top of that file.Signed-off-by Andy Shevchenko <[email protected]>---
Not fully compile tested, might give some compilation errors
arch/x86/include/asm/cpumask.h | 2 ++ include/linux/cpumask.h | 12 +++++++----- 2 files changed, 9 insertions(+), 5 deletions(-)arch/x86/include/asm/cpumask.h +2
-0@@ -2,6 +2,8 @@#ifndef _ASM_X86_CPUMASK_H#define _ASM_X86_CPUMASK_H#ifndef __ASSEMBLER__ + +#include <linux/compiler.h> #include <linux/cpumask.h> extern void setup_cpu_local_masks (void );include/linux/cpumask.h +0
-0
include/linux/cpumask.h line 11
Quoted 5 lines
include/linux/cpumask.h +0
-2@@ -7,14 +7,16 @@* set of CPUs in a system, one bit position per CPU number. In general, * only nr_cpu_ids (<= NR_CPUS) bits are valid. */ -#include <linux/cleanup.h> -#include <linux/kernel.h>
I recall, removing kernel.h from cpumasks was a troublesome exercise back then. But it may be my false memory.
Added this for testing in bitmap-for-next.
Thanks,
Yury
Quoted 18 lines
include/linux/cpumask.h +7
-3-#include <linux/bitmap.h> -#include <linux/cpumask_types.h> #include <linux/atomic.h> -#include <linux/bug.h> +#include <linux/bitmap.h> +#include <linux/cleanup.h> +#include <linux/cpumask_types.h> #include <linux/gfp_types.h> #include <linux/numa.h> +#include <linux/threads.h> +#include <linux/types.h> + +#include <asm/bug.h> /** * cpumask_pr_args - printf args to output a cpumask Signature · 1 line
2.50.1
Quoted 3 lines · Yury Norov
Quoted 1 line · Andy Shevchenko
Not fully compile tested, might give some compilation errors
...
Quoted 5 lines
include/linux/cpumask.h line 11
Quoted 2 lines
include/linux/cpumask.h +0
-2-#include <linux/cleanup.h> -#include <linux/kernel.h> I recall, removing
kernel.hfrom cpumasks was a troublesome exercise back then. But it may be my false memory.
Yeah, there are several headers that are too tangled together. At least it builds on my configurations on x86_64.
Quoted 1 line
Added this for testing in bitmap-for-next.
Thanks, let's see how it will go. But note that it might fall the builds in some cases.
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 4 lines · Andy Shevchenko
Quoted 3 lines · Yury Norov
Quoted 1 line · Andy Shevchenko
Not fully compile tested, might give some compilation errors
...
Quoted 6 lines
Quoted 5 lines
include/linux/cpumask.h line 11
Quoted 2 lines
include/linux/cpumask.h +0
-2-#include <linux/cleanup.h> -#include <linux/kernel.h> I recall, removing
kernel.hfrom cpumasks was a troublesome exercise back then. But it may be my false memory.
Quoted 7 lines
Yeah, there are several headers that are too tangled together. At least it builds on my configurations on
x86_64.Quoted 1 line
Added this for testing in bitmap-for-next.
Thanks, let's see how it will go. But note that it might fall the builds in some cases.
So, we survived already a couple of Linux Next integration builds, I believe we are quite okay with this change and if anything appears, it can be fixed in a followups.
Thanks!
Signature · 2 lines
With Best Regards, Andy Shevchenko
Yury Norov
maintainerQuoted 17 lines · Andy Shevchenko
Quoted 4 lines · Andy Shevchenko
Quoted 3 lines · Yury Norov
Quoted 1 line · Andy Shevchenko
Not fully compile tested, might give some compilation errors
...
Quoted 9 lines
Quoted 5 lines
include/linux/cpumask.h line 11
Quoted 2 lines
include/linux/cpumask.h +0
-2-#include <linux/cleanup.h> -#include <linux/kernel.h> I recall, removing
kernel.hfrom cpumasks was a troublesome exercise back then. But it may be my false memory.Yeah, there are several headers that are too tangled together. At least it builds on my configurations on
x86_64.
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
Added this for testing in bitmap-for-next.
Thanks, let's see how it will go. But note that it might fall the builds in some cases.
So, we survived already a couple of Linux Next integration builds, I believe we are quite okay with this change and if anything appears, it can be fixed in a followups.
Yeah. I'll just keep the patch in my branch, so hopefully it will land in mainline in the next merge cycle.
Thanks,
Yury