* [PATCH] arm64: Explicitly include correct DT includes
@ 2023-07-14 17:40 Rob Herring
2023-07-17 9:06 ` Will Deacon
2023-07-31 17:44 ` Will Deacon
0 siblings, 2 replies; 4+ messages in thread
From: Rob Herring @ 2023-07-14 17:40 UTC (permalink / raw)
To: Catalin Marinas, Will Deacon; +Cc: devicetree, linux-arm-kernel, linux-kernel
The DT of_device.h and of_platform.h date back to the separate
of_platform_bus_type before it as merged into the regular platform bus.
As part of that merge prepping Arm DT support 13 years ago, they
"temporarily" include each other. They also include platform_device.h
and of.h. As a result, there's a pretty much random mix of those include
files used throughout the tree. In order to detangle these headers and
replace the implicit includes with struct declarations, users need to
explicitly include the correct includes.
Signed-off-by: Rob Herring <robh@kernel.org>
---
arch/arm64/kernel/cpuidle.c | 2 --
arch/arm64/kernel/pci.c | 2 --
2 files changed, 4 deletions(-)
diff --git a/arch/arm64/kernel/cpuidle.c b/arch/arm64/kernel/cpuidle.c
index d1f68599c29f..f372295207fb 100644
--- a/arch/arm64/kernel/cpuidle.c
+++ b/arch/arm64/kernel/cpuidle.c
@@ -9,8 +9,6 @@
#include <linux/acpi.h>
#include <linux/cpuidle.h>
#include <linux/cpu_pm.h>
-#include <linux/of.h>
-#include <linux/of_device.h>
#include <linux/psci.h>
#ifdef CONFIG_ACPI_PROCESSOR_IDLE
diff --git a/arch/arm64/kernel/pci.c b/arch/arm64/kernel/pci.c
index 2276689b5411..f872c57e9909 100644
--- a/arch/arm64/kernel/pci.c
+++ b/arch/arm64/kernel/pci.c
@@ -11,8 +11,6 @@
#include <linux/io.h>
#include <linux/kernel.h>
#include <linux/mm.h>
-#include <linux/of_pci.h>
-#include <linux/of_platform.h>
#include <linux/pci.h>
#include <linux/pci-acpi.h>
#include <linux/pci-ecam.h>
--
2.40.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] arm64: Explicitly include correct DT includes
2023-07-14 17:40 [PATCH] arm64: Explicitly include correct DT includes Rob Herring
@ 2023-07-17 9:06 ` Will Deacon
2023-07-17 17:56 ` Rob Herring
2023-07-31 17:44 ` Will Deacon
1 sibling, 1 reply; 4+ messages in thread
From: Will Deacon @ 2023-07-17 9:06 UTC (permalink / raw)
To: Rob Herring; +Cc: Catalin Marinas, devicetree, linux-arm-kernel, linux-kernel
On Fri, Jul 14, 2023 at 11:40:20AM -0600, Rob Herring wrote:
> The DT of_device.h and of_platform.h date back to the separate
> of_platform_bus_type before it as merged into the regular platform bus.
> As part of that merge prepping Arm DT support 13 years ago, they
> "temporarily" include each other. They also include platform_device.h
> and of.h. As a result, there's a pretty much random mix of those include
> files used throughout the tree. In order to detangle these headers and
> replace the implicit includes with struct declarations, users need to
> explicitly include the correct includes.
>
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> arch/arm64/kernel/cpuidle.c | 2 --
> arch/arm64/kernel/pci.c | 2 --
> 2 files changed, 4 deletions(-)
>
> diff --git a/arch/arm64/kernel/cpuidle.c b/arch/arm64/kernel/cpuidle.c
> index d1f68599c29f..f372295207fb 100644
> --- a/arch/arm64/kernel/cpuidle.c
> +++ b/arch/arm64/kernel/cpuidle.c
> @@ -9,8 +9,6 @@
> #include <linux/acpi.h>
> #include <linux/cpuidle.h>
> #include <linux/cpu_pm.h>
> -#include <linux/of.h>
> -#include <linux/of_device.h>
> #include <linux/psci.h>
I don't grok how dropping 'linux/of.h' follows from the commit message.
Is it simply not needed by this file?
Will
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] arm64: Explicitly include correct DT includes
2023-07-17 9:06 ` Will Deacon
@ 2023-07-17 17:56 ` Rob Herring
0 siblings, 0 replies; 4+ messages in thread
From: Rob Herring @ 2023-07-17 17:56 UTC (permalink / raw)
To: Will Deacon; +Cc: Catalin Marinas, devicetree, linux-arm-kernel, linux-kernel
On Mon, Jul 17, 2023 at 3:06 AM Will Deacon <will@kernel.org> wrote:
>
> On Fri, Jul 14, 2023 at 11:40:20AM -0600, Rob Herring wrote:
> > The DT of_device.h and of_platform.h date back to the separate
> > of_platform_bus_type before it as merged into the regular platform bus.
> > As part of that merge prepping Arm DT support 13 years ago, they
> > "temporarily" include each other. They also include platform_device.h
> > and of.h. As a result, there's a pretty much random mix of those include
> > files used throughout the tree. In order to detangle these headers and
> > replace the implicit includes with struct declarations, users need to
> > explicitly include the correct includes.
> >
> > Signed-off-by: Rob Herring <robh@kernel.org>
> > ---
> > arch/arm64/kernel/cpuidle.c | 2 --
> > arch/arm64/kernel/pci.c | 2 --
> > 2 files changed, 4 deletions(-)
> >
> > diff --git a/arch/arm64/kernel/cpuidle.c b/arch/arm64/kernel/cpuidle.c
> > index d1f68599c29f..f372295207fb 100644
> > --- a/arch/arm64/kernel/cpuidle.c
> > +++ b/arch/arm64/kernel/cpuidle.c
> > @@ -9,8 +9,6 @@
> > #include <linux/acpi.h>
> > #include <linux/cpuidle.h>
> > #include <linux/cpu_pm.h>
> > -#include <linux/of.h>
> > -#include <linux/of_device.h>
> > #include <linux/psci.h>
>
> I don't grok how dropping 'linux/of.h' follows from the commit message.
> Is it simply not needed by this file?
The motivation is to disentangle of_device.h includes. The fix is
making sure the explicit DT includes match what is used. The result
varies and here none of the DT headers are needed.
Rob
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] arm64: Explicitly include correct DT includes
2023-07-14 17:40 [PATCH] arm64: Explicitly include correct DT includes Rob Herring
2023-07-17 9:06 ` Will Deacon
@ 2023-07-31 17:44 ` Will Deacon
1 sibling, 0 replies; 4+ messages in thread
From: Will Deacon @ 2023-07-31 17:44 UTC (permalink / raw)
To: Catalin Marinas, Rob Herring
Cc: kernel-team, Will Deacon, devicetree, linux-arm-kernel,
linux-kernel
On Fri, 14 Jul 2023 11:40:20 -0600, Rob Herring wrote:
> The DT of_device.h and of_platform.h date back to the separate
> of_platform_bus_type before it as merged into the regular platform bus.
> As part of that merge prepping Arm DT support 13 years ago, they
> "temporarily" include each other. They also include platform_device.h
> and of.h. As a result, there's a pretty much random mix of those include
> files used throughout the tree. In order to detangle these headers and
> replace the implicit includes with struct declarations, users need to
> explicitly include the correct includes.
>
> [...]
Applied to arm64 (for-next/misc), thanks!
[1/1] arm64: Explicitly include correct DT includes
https://git.kernel.org/arm64/c/b9d601249740
Cheers,
--
Will
https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-07-31 17:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-14 17:40 [PATCH] arm64: Explicitly include correct DT includes Rob Herring
2023-07-17 9:06 ` Will Deacon
2023-07-17 17:56 ` Rob Herring
2023-07-31 17:44 ` Will Deacon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).