* [PATCH] misc: Explicitly include correct DT includes
@ 2023-07-14 17:47 Rob Herring
2023-07-17 10:33 ` Andrew Donnellan
2023-07-17 17:47 ` Rob Herring
0 siblings, 2 replies; 3+ messages in thread
From: Rob Herring @ 2023-07-14 17:47 UTC (permalink / raw)
To: Frederic Barrat, Andrew Donnellan, Arnd Bergmann,
Greg Kroah-Hartman, Srinivas Kandagatla, Amol Maheshwari,
Eric Piel, Andy Gross, Bjorn Andersson, Konrad Dybcio,
Derek Kiernan, Dragan Cvetic, Michal Simek,
Appana Durga Kedareswara rao
Cc: devicetree, linuxppc-dev, linux-kernel, linux-arm-kernel,
linux-arm-msm
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>
---
drivers/misc/cxl/base.c | 1 +
drivers/misc/fastrpc.c | 1 +
drivers/misc/lis3lv02d/lis3lv02d.c | 2 +-
drivers/misc/qcom-coincell.c | 1 -
drivers/misc/sram.c | 2 +-
drivers/misc/vcpu_stall_detector.c | 1 -
drivers/misc/xilinx_sdfec.c | 4 +++-
drivers/misc/xilinx_tmr_inject.c | 3 ++-
drivers/misc/xilinx_tmr_manager.c | 3 ++-
9 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/drivers/misc/cxl/base.c b/drivers/misc/cxl/base.c
index cc0caf9192dc..b054562c046e 100644
--- a/drivers/misc/cxl/base.c
+++ b/drivers/misc/cxl/base.c
@@ -7,6 +7,7 @@
#include <linux/rcupdate.h>
#include <asm/errno.h>
#include <misc/cxl-base.h>
+#include <linux/of.h>
#include <linux/of_platform.h>
#include "cxl.h"
diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c
index 9666d28037e1..1c7c0532da6f 100644
--- a/drivers/misc/fastrpc.c
+++ b/drivers/misc/fastrpc.c
@@ -13,6 +13,7 @@
#include <linux/module.h>
#include <linux/of_address.h>
#include <linux/of.h>
+#include <linux/platform_device.h>
#include <linux/sort.h>
#include <linux/of_platform.h>
#include <linux/rpmsg.h>
diff --git a/drivers/misc/lis3lv02d/lis3lv02d.c b/drivers/misc/lis3lv02d/lis3lv02d.c
index 299d316f1bda..49868a45c0ad 100644
--- a/drivers/misc/lis3lv02d/lis3lv02d.c
+++ b/drivers/misc/lis3lv02d/lis3lv02d.c
@@ -26,7 +26,7 @@
#include <linux/miscdevice.h>
#include <linux/pm_runtime.h>
#include <linux/atomic.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
#include "lis3lv02d.h"
#define DRIVER_NAME "lis3lv02d"
diff --git a/drivers/misc/qcom-coincell.c b/drivers/misc/qcom-coincell.c
index 54d4f6ee8888..3c57f7429147 100644
--- a/drivers/misc/qcom-coincell.c
+++ b/drivers/misc/qcom-coincell.c
@@ -8,7 +8,6 @@
#include <linux/slab.h>
#include <linux/of.h>
#include <linux/regmap.h>
-#include <linux/of_device.h>
#include <linux/platform_device.h>
struct qcom_coincell {
diff --git a/drivers/misc/sram.c b/drivers/misc/sram.c
index 5757adf418b1..a88f92cf35be 100644
--- a/drivers/misc/sram.c
+++ b/drivers/misc/sram.c
@@ -10,8 +10,8 @@
#include <linux/genalloc.h>
#include <linux/io.h>
#include <linux/list_sort.h>
+#include <linux/of.h>
#include <linux/of_address.h>
-#include <linux/of_device.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/slab.h>
diff --git a/drivers/misc/vcpu_stall_detector.c b/drivers/misc/vcpu_stall_detector.c
index 53b5506080e1..6479c962da1a 100644
--- a/drivers/misc/vcpu_stall_detector.c
+++ b/drivers/misc/vcpu_stall_detector.c
@@ -13,7 +13,6 @@
#include <linux/module.h>
#include <linux/nmi.h>
#include <linux/of.h>
-#include <linux/of_device.h>
#include <linux/param.h>
#include <linux/percpu.h>
#include <linux/platform_device.h>
diff --git a/drivers/misc/xilinx_sdfec.c b/drivers/misc/xilinx_sdfec.c
index 270ff4c5971a..35941c006552 100644
--- a/drivers/misc/xilinx_sdfec.c
+++ b/drivers/misc/xilinx_sdfec.c
@@ -15,12 +15,14 @@
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/module.h>
-#include <linux/of_platform.h>
+#include <linux/of.h>
+#include <linux/platform_device.h>
#include <linux/poll.h>
#include <linux/slab.h>
#include <linux/clk.h>
#include <linux/compat.h>
#include <linux/highmem.h>
+#include <linux/of.h>
#include <uapi/misc/xilinx_sdfec.h>
diff --git a/drivers/misc/xilinx_tmr_inject.c b/drivers/misc/xilinx_tmr_inject.c
index d96f6d7cd109..9fc5835bfebc 100644
--- a/drivers/misc/xilinx_tmr_inject.c
+++ b/drivers/misc/xilinx_tmr_inject.c
@@ -11,7 +11,8 @@
#include <asm/xilinx_mb_manager.h>
#include <linux/module.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
+#include <linux/platform_device.h>
#include <linux/fault-inject.h>
/* TMR Inject Register offsets */
diff --git a/drivers/misc/xilinx_tmr_manager.c b/drivers/misc/xilinx_tmr_manager.c
index 0ef55e06d3a0..3e4e40c3766f 100644
--- a/drivers/misc/xilinx_tmr_manager.c
+++ b/drivers/misc/xilinx_tmr_manager.c
@@ -15,7 +15,8 @@
#include <asm/xilinx_mb_manager.h>
#include <linux/module.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
+#include <linux/platform_device.h>
/* TMR Manager Register offsets */
#define XTMR_MANAGER_CR_OFFSET 0x0
--
2.40.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] misc: Explicitly include correct DT includes
2023-07-14 17:47 [PATCH] misc: Explicitly include correct DT includes Rob Herring
@ 2023-07-17 10:33 ` Andrew Donnellan
2023-07-17 17:47 ` Rob Herring
1 sibling, 0 replies; 3+ messages in thread
From: Andrew Donnellan @ 2023-07-17 10:33 UTC (permalink / raw)
To: Rob Herring, Frederic Barrat, Arnd Bergmann, Greg Kroah-Hartman,
Srinivas Kandagatla, Amol Maheshwari, Eric Piel, Andy Gross,
Bjorn Andersson, Konrad Dybcio, Derek Kiernan, Dragan Cvetic,
Michal Simek, Appana Durga Kedareswara rao
Cc: devicetree, linuxppc-dev, linux-kernel, linux-arm-kernel,
linux-arm-msm
On Fri, 2023-07-14 at 11:47 -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>
Acked-by: Andrew Donnellan <ajd@linux.ibm.com> # cxl
--
Andrew Donnellan OzLabs, ADL Canberra
ajd@linux.ibm.com IBM Australia Limited
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] misc: Explicitly include correct DT includes
2023-07-14 17:47 [PATCH] misc: Explicitly include correct DT includes Rob Herring
2023-07-17 10:33 ` Andrew Donnellan
@ 2023-07-17 17:47 ` Rob Herring
1 sibling, 0 replies; 3+ messages in thread
From: Rob Herring @ 2023-07-17 17:47 UTC (permalink / raw)
To: Frederic Barrat, Andrew Donnellan, Arnd Bergmann,
Greg Kroah-Hartman, Srinivas Kandagatla, Amol Maheshwari,
Eric Piel, Andy Gross, Bjorn Andersson, Konrad Dybcio,
Derek Kiernan, Dragan Cvetic, Michal Simek,
Appana Durga Kedareswara rao
Cc: devicetree, linuxppc-dev, linux-kernel, linux-arm-kernel,
linux-arm-msm
On Fri, Jul 14, 2023 at 11:47 AM Rob Herring <robh@kernel.org> 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>
> ---
> drivers/misc/cxl/base.c | 1 +
> drivers/misc/fastrpc.c | 1 +
> drivers/misc/lis3lv02d/lis3lv02d.c | 2 +-
> drivers/misc/qcom-coincell.c | 1 -
> drivers/misc/sram.c | 2 +-
> drivers/misc/vcpu_stall_detector.c | 1 -
> drivers/misc/xilinx_sdfec.c | 4 +++-
> drivers/misc/xilinx_tmr_inject.c | 3 ++-
> drivers/misc/xilinx_tmr_manager.c | 3 ++-
> 9 files changed, 11 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/misc/cxl/base.c b/drivers/misc/cxl/base.c
> index cc0caf9192dc..b054562c046e 100644
> --- a/drivers/misc/cxl/base.c
> +++ b/drivers/misc/cxl/base.c
> @@ -7,6 +7,7 @@
> #include <linux/rcupdate.h>
> #include <asm/errno.h>
> #include <misc/cxl-base.h>
> +#include <linux/of.h>
> #include <linux/of_platform.h>
> #include "cxl.h"
>
> diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c
> index 9666d28037e1..1c7c0532da6f 100644
> --- a/drivers/misc/fastrpc.c
> +++ b/drivers/misc/fastrpc.c
> @@ -13,6 +13,7 @@
> #include <linux/module.h>
> #include <linux/of_address.h>
> #include <linux/of.h>
> +#include <linux/platform_device.h>
> #include <linux/sort.h>
> #include <linux/of_platform.h>
> #include <linux/rpmsg.h>
> diff --git a/drivers/misc/lis3lv02d/lis3lv02d.c b/drivers/misc/lis3lv02d/lis3lv02d.c
> index 299d316f1bda..49868a45c0ad 100644
> --- a/drivers/misc/lis3lv02d/lis3lv02d.c
> +++ b/drivers/misc/lis3lv02d/lis3lv02d.c
> @@ -26,7 +26,7 @@
> #include <linux/miscdevice.h>
> #include <linux/pm_runtime.h>
> #include <linux/atomic.h>
> -#include <linux/of_device.h>
> +#include <linux/of.h>
> #include "lis3lv02d.h"
>
> #define DRIVER_NAME "lis3lv02d"
> diff --git a/drivers/misc/qcom-coincell.c b/drivers/misc/qcom-coincell.c
> index 54d4f6ee8888..3c57f7429147 100644
> --- a/drivers/misc/qcom-coincell.c
> +++ b/drivers/misc/qcom-coincell.c
> @@ -8,7 +8,6 @@
> #include <linux/slab.h>
> #include <linux/of.h>
> #include <linux/regmap.h>
> -#include <linux/of_device.h>
> #include <linux/platform_device.h>
>
> struct qcom_coincell {
> diff --git a/drivers/misc/sram.c b/drivers/misc/sram.c
> index 5757adf418b1..a88f92cf35be 100644
> --- a/drivers/misc/sram.c
> +++ b/drivers/misc/sram.c
> @@ -10,8 +10,8 @@
> #include <linux/genalloc.h>
> #include <linux/io.h>
> #include <linux/list_sort.h>
> +#include <linux/of.h>
> #include <linux/of_address.h>
> -#include <linux/of_device.h>
> #include <linux/platform_device.h>
> #include <linux/regmap.h>
> #include <linux/slab.h>
> diff --git a/drivers/misc/vcpu_stall_detector.c b/drivers/misc/vcpu_stall_detector.c
> index 53b5506080e1..6479c962da1a 100644
> --- a/drivers/misc/vcpu_stall_detector.c
> +++ b/drivers/misc/vcpu_stall_detector.c
> @@ -13,7 +13,6 @@
> #include <linux/module.h>
> #include <linux/nmi.h>
> #include <linux/of.h>
> -#include <linux/of_device.h>
> #include <linux/param.h>
> #include <linux/percpu.h>
> #include <linux/platform_device.h>
> diff --git a/drivers/misc/xilinx_sdfec.c b/drivers/misc/xilinx_sdfec.c
> index 270ff4c5971a..35941c006552 100644
> --- a/drivers/misc/xilinx_sdfec.c
> +++ b/drivers/misc/xilinx_sdfec.c
> @@ -15,12 +15,14 @@
> #include <linux/interrupt.h>
> #include <linux/kernel.h>
> #include <linux/module.h>
> -#include <linux/of_platform.h>
> +#include <linux/of.h>
> +#include <linux/platform_device.h>
> #include <linux/poll.h>
> #include <linux/slab.h>
> #include <linux/clk.h>
> #include <linux/compat.h>
> #include <linux/highmem.h>
> +#include <linux/of.h>
Double include of of.h. v2 coming.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-07-17 17:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-14 17:47 [PATCH] misc: Explicitly include correct DT includes Rob Herring
2023-07-17 10:33 ` Andrew Donnellan
2023-07-17 17:47 ` Rob Herring
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).