* [PATCH] cdx: Explicitly include correct DT includes
@ 2023-07-17 15:03 Rob Herring
2023-07-18 4:59 ` Gupta, Nipun
0 siblings, 1 reply; 2+ messages in thread
From: Rob Herring @ 2023-07-17 15:03 UTC (permalink / raw)
To: Nipun Gupta, Nikhil Agarwal, Greg Kroah-Hartman; +Cc: devicetree, 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>
---
Note that drivers/cdx/ is missing a MAINTAINERS entry. Please add one.
drivers/cdx/controller/cdx_controller.c | 3 ++-
drivers/cdx/controller/cdx_rpmsg.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/cdx/controller/cdx_controller.c b/drivers/cdx/controller/cdx_controller.c
index dc52f95f8978..bb4ae7970e21 100644
--- a/drivers/cdx/controller/cdx_controller.c
+++ b/drivers/cdx/controller/cdx_controller.c
@@ -5,7 +5,8 @@
* Copyright (C) 2022-2023, Advanced Micro Devices, Inc.
*/
-#include <linux/of_platform.h>
+#include <linux/mod_devicetable.h>
+#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/cdx/cdx_bus.h>
diff --git a/drivers/cdx/controller/cdx_rpmsg.c b/drivers/cdx/controller/cdx_rpmsg.c
index f37e639d6ce3..04b578a0be17 100644
--- a/drivers/cdx/controller/cdx_rpmsg.c
+++ b/drivers/cdx/controller/cdx_rpmsg.c
@@ -7,7 +7,8 @@
#include <linux/rpmsg.h>
#include <linux/remoteproc.h>
-#include <linux/of_platform.h>
+#include <linux/of.h>
+#include <linux/platform_device.h>
#include <linux/cdx/cdx_bus.h>
#include <linux/module.h>
--
2.40.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] cdx: Explicitly include correct DT includes
2023-07-17 15:03 [PATCH] cdx: Explicitly include correct DT includes Rob Herring
@ 2023-07-18 4:59 ` Gupta, Nipun
0 siblings, 0 replies; 2+ messages in thread
From: Gupta, Nipun @ 2023-07-18 4:59 UTC (permalink / raw)
To: Rob Herring, Nikhil Agarwal, Greg Kroah-Hartman; +Cc: devicetree, linux-kernel
On 7/17/2023 8:33 PM, 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>
Acked-by: Nipun Gupta <nipun.gupta@amd.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-07-18 4:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-17 15:03 [PATCH] cdx: Explicitly include correct DT includes Rob Herring
2023-07-18 4:59 ` Gupta, Nipun
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).