* [PATCH] ARM: socfpga: Explicitly include correct DT includes
@ 2023-07-17 22:54 Rob Herring
2023-07-20 21:29 ` Dinh Nguyen
0 siblings, 1 reply; 4+ messages in thread
From: Rob Herring @ 2023-07-17 22:54 UTC (permalink / raw)
To: Dinh Nguyen, Russell King; +Cc: 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 was 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.
A couple of other includes are unused and can be dropped too.
Signed-off-by: Rob Herring <robh@kernel.org>
---
arch/arm/mach-socfpga/l2_cache.c | 2 +-
arch/arm/mach-socfpga/ocram.c | 4 +---
arch/arm/mach-socfpga/pm.c | 2 ++
arch/arm/mach-socfpga/socfpga.c | 4 +---
4 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/arch/arm/mach-socfpga/l2_cache.c b/arch/arm/mach-socfpga/l2_cache.c
index 99fb95361590..86e011eeb444 100644
--- a/arch/arm/mach-socfpga/l2_cache.c
+++ b/arch/arm/mach-socfpga/l2_cache.c
@@ -3,7 +3,7 @@
* Copyright Altera Corporation (C) 2016. All rights reserved.
*/
#include <linux/io.h>
-#include <linux/of_platform.h>
+#include <linux/of.h>
#include <linux/of_address.h>
#include "core.h"
diff --git a/arch/arm/mach-socfpga/ocram.c b/arch/arm/mach-socfpga/ocram.c
index b4d397e834a0..9f1a249debf6 100644
--- a/arch/arm/mach-socfpga/ocram.c
+++ b/arch/arm/mach-socfpga/ocram.c
@@ -4,10 +4,8 @@
*/
#include <linux/delay.h>
#include <linux/io.h>
-#include <linux/genalloc.h>
-#include <linux/module.h>
+#include <linux/of.h>
#include <linux/of_address.h>
-#include <linux/of_platform.h>
#include "core.h"
diff --git a/arch/arm/mach-socfpga/pm.c b/arch/arm/mach-socfpga/pm.c
index 365c0428b21b..ab1c08f971f0 100644
--- a/arch/arm/mach-socfpga/pm.c
+++ b/arch/arm/mach-socfpga/pm.c
@@ -13,7 +13,9 @@
#include <linux/genalloc.h>
#include <linux/init.h>
#include <linux/io.h>
+#include <linux/of.h>
#include <linux/of_platform.h>
+#include <linux/platform_device.h>
#include <linux/suspend.h>
#include <asm/suspend.h>
#include <asm/fncpy.h>
diff --git a/arch/arm/mach-socfpga/socfpga.c b/arch/arm/mach-socfpga/socfpga.c
index 9e4cb2ffd580..4332af2d8b86 100644
--- a/arch/arm/mach-socfpga/socfpga.c
+++ b/arch/arm/mach-socfpga/socfpga.c
@@ -3,13 +3,11 @@
* Copyright (C) 2012-2015 Altera Corporation
*/
#include <linux/irqchip.h>
+#include <linux/of.h>
#include <linux/of_address.h>
-#include <linux/of_irq.h>
-#include <linux/of_platform.h>
#include <linux/reboot.h>
#include <linux/reset/socfpga.h>
-#include <asm/hardware/cache-l2x0.h>
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
#include <asm/cacheflush.h>
--
2.40.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] ARM: socfpga: Explicitly include correct DT includes
2023-07-17 22:54 [PATCH] ARM: socfpga: Explicitly include correct DT includes Rob Herring
@ 2023-07-20 21:29 ` Dinh Nguyen
2023-08-22 22:29 ` Rob Herring
0 siblings, 1 reply; 4+ messages in thread
From: Dinh Nguyen @ 2023-07-20 21:29 UTC (permalink / raw)
To: Rob Herring, Russell King; +Cc: linux-arm-kernel, linux-kernel
On 7/17/23 17:54, Rob Herring wrote:
> The DT of_device.h and of_platform.h date back to the separate
> of_platform_bus_type before it was 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!
Thanks,
Dinh
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ARM: socfpga: Explicitly include correct DT includes
2023-07-20 21:29 ` Dinh Nguyen
@ 2023-08-22 22:29 ` Rob Herring
2023-08-23 2:11 ` Dinh Nguyen
0 siblings, 1 reply; 4+ messages in thread
From: Rob Herring @ 2023-08-22 22:29 UTC (permalink / raw)
To: Dinh Nguyen; +Cc: Russell King, linux-arm-kernel, linux-kernel
On Thu, Jul 20, 2023 at 4:29 PM Dinh Nguyen <dinguyen@kernel.org> wrote:
>
>
>
> On 7/17/23 17:54, Rob Herring wrote:
> > The DT of_device.h and of_platform.h date back to the separate
> > of_platform_bus_type before it was 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!
Did you really? Doesn't look like this is in linux-next.
Rob
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ARM: socfpga: Explicitly include correct DT includes
2023-08-22 22:29 ` Rob Herring
@ 2023-08-23 2:11 ` Dinh Nguyen
0 siblings, 0 replies; 4+ messages in thread
From: Dinh Nguyen @ 2023-08-23 2:11 UTC (permalink / raw)
To: Rob Herring; +Cc: Russell King, linux-arm-kernel, linux-kernel
On 8/22/23 17:29, Rob Herring wrote:
> On Thu, Jul 20, 2023 at 4:29 PM Dinh Nguyen <dinguyen@kernel.org> wrote:
>>
>>
>>
>> On 7/17/23 17:54, Rob Herring wrote:
>>> The DT of_device.h and of_platform.h date back to the separate
>>> of_platform_bus_type before it was 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!
>
> Did you really? Doesn't look like this is in linux-next.
I did, but haven't sent a PR to armsoc. Will do it now, thanks for the
reminder!
Dinh
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-08-23 2:12 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-17 22:54 [PATCH] ARM: socfpga: Explicitly include correct DT includes Rob Herring
2023-07-20 21:29 ` Dinh Nguyen
2023-08-22 22:29 ` Rob Herring
2023-08-23 2:11 ` Dinh Nguyen
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).