devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] firmware: Explicitly include correct DT includes
@ 2023-07-14 17:44 Rob Herring
  2023-07-14 19:34 ` Dinh Nguyen
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Rob Herring @ 2023-07-14 17:44 UTC (permalink / raw)
  To: Sudeep Holla, Cristian Marussi, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Matthias Brugger, AngeloGioacchino Del Regno, Florian Fainelli,
	Broadcom internal kernel review list, Dinh Nguyen, Thierry Reding,
	Jonathan Hunter, Michal Simek
  Cc: devicetree, linux-arm-kernel, linux-kernel, linux-mediatek,
	linux-rpi-kernel, linux-tegra

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/firmware/arm_scmi/driver.c | 4 ++--
 drivers/firmware/imx/imx-dsp.c     | 1 -
 drivers/firmware/imx/imx-scu-irq.c | 1 +
 drivers/firmware/imx/imx-scu.c     | 1 +
 drivers/firmware/mtk-adsp-ipc.c    | 1 -
 drivers/firmware/raspberrypi.c     | 1 +
 drivers/firmware/scpi_pm_domain.c  | 3 ++-
 drivers/firmware/stratix10-rsu.c   | 1 -
 drivers/firmware/tegra/bpmp.c      | 3 +--
 drivers/firmware/xilinx/zynqmp.c   | 1 +
 10 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/drivers/firmware/arm_scmi/driver.c b/drivers/firmware/arm_scmi/driver.c
index b5957cc12fee..87383c05424b 100644
--- a/drivers/firmware/arm_scmi/driver.c
+++ b/drivers/firmware/arm_scmi/driver.c
@@ -28,8 +28,8 @@
 #include <linux/hashtable.h>
 #include <linux/list.h>
 #include <linux/module.h>
-#include <linux/of_address.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
+#include <linux/platform_device.h>
 #include <linux/processor.h>
 #include <linux/refcount.h>
 #include <linux/slab.h>
diff --git a/drivers/firmware/imx/imx-dsp.c b/drivers/firmware/imx/imx-dsp.c
index a6c06d7476c3..3dba590a2a95 100644
--- a/drivers/firmware/imx/imx-dsp.c
+++ b/drivers/firmware/imx/imx-dsp.c
@@ -10,7 +10,6 @@
 #include <linux/kernel.h>
 #include <linux/mailbox_client.h>
 #include <linux/module.h>
-#include <linux/of_platform.h>
 #include <linux/platform_device.h>
 #include <linux/slab.h>
 
diff --git a/drivers/firmware/imx/imx-scu-irq.c b/drivers/firmware/imx/imx-scu-irq.c
index d9dcc20945c6..a149537e0639 100644
--- a/drivers/firmware/imx/imx-scu-irq.c
+++ b/drivers/firmware/imx/imx-scu-irq.c
@@ -10,6 +10,7 @@
 #include <linux/firmware/imx/ipc.h>
 #include <linux/firmware/imx/sci.h>
 #include <linux/mailbox_client.h>
+#include <linux/of.h>
 #include <linux/suspend.h>
 
 #define IMX_SC_IRQ_FUNC_ENABLE	1
diff --git a/drivers/firmware/imx/imx-scu.c b/drivers/firmware/imx/imx-scu.c
index 47db49911e7b..2e5914f3a110 100644
--- a/drivers/firmware/imx/imx-scu.c
+++ b/drivers/firmware/imx/imx-scu.c
@@ -16,6 +16,7 @@
 #include <linux/mailbox_client.h>
 #include <linux/module.h>
 #include <linux/mutex.h>
+#include <linux/of.h>
 #include <linux/of_platform.h>
 #include <linux/platform_device.h>
 
diff --git a/drivers/firmware/mtk-adsp-ipc.c b/drivers/firmware/mtk-adsp-ipc.c
index 3c071f814455..85e94ddc7204 100644
--- a/drivers/firmware/mtk-adsp-ipc.c
+++ b/drivers/firmware/mtk-adsp-ipc.c
@@ -8,7 +8,6 @@
 #include <linux/kernel.h>
 #include <linux/mailbox_client.h>
 #include <linux/module.h>
-#include <linux/of_platform.h>
 #include <linux/platform_device.h>
 #include <linux/slab.h>
 
diff --git a/drivers/firmware/raspberrypi.c b/drivers/firmware/raspberrypi.c
index c3bc29e0a488..f66efaa5196d 100644
--- a/drivers/firmware/raspberrypi.c
+++ b/drivers/firmware/raspberrypi.c
@@ -10,6 +10,7 @@
 #include <linux/kref.h>
 #include <linux/mailbox_client.h>
 #include <linux/module.h>
+#include <linux/of.h>
 #include <linux/of_platform.h>
 #include <linux/platform_device.h>
 #include <linux/slab.h>
diff --git a/drivers/firmware/scpi_pm_domain.c b/drivers/firmware/scpi_pm_domain.c
index 800673910b51..2231e6dd2070 100644
--- a/drivers/firmware/scpi_pm_domain.c
+++ b/drivers/firmware/scpi_pm_domain.c
@@ -8,7 +8,8 @@
 #include <linux/err.h>
 #include <linux/io.h>
 #include <linux/module.h>
-#include <linux/of_platform.h>
+#include <linux/of.h>
+#include <linux/platform_device.h>
 #include <linux/pm_domain.h>
 #include <linux/scpi_protocol.h>
 
diff --git a/drivers/firmware/stratix10-rsu.c b/drivers/firmware/stratix10-rsu.c
index e51c95f8d445..ab3074705380 100644
--- a/drivers/firmware/stratix10-rsu.c
+++ b/drivers/firmware/stratix10-rsu.c
@@ -10,7 +10,6 @@
 #include <linux/module.h>
 #include <linux/mutex.h>
 #include <linux/of.h>
-#include <linux/of_platform.h>
 #include <linux/platform_device.h>
 #include <linux/firmware/intel/stratix10-svc-client.h>
 #include <linux/string.h>
diff --git a/drivers/firmware/tegra/bpmp.c b/drivers/firmware/tegra/bpmp.c
index 17bd3590aaa2..51d062e0c3f1 100644
--- a/drivers/firmware/tegra/bpmp.c
+++ b/drivers/firmware/tegra/bpmp.c
@@ -8,8 +8,7 @@
 #include <linux/mailbox_client.h>
 #include <linux/module.h>
 #include <linux/of.h>
-#include <linux/of_address.h>
-#include <linux/of_device.h>
+#include <linux/of_platform.h>
 #include <linux/platform_device.h>
 #include <linux/pm.h>
 #include <linux/semaphore.h>
diff --git a/drivers/firmware/xilinx/zynqmp.c b/drivers/firmware/xilinx/zynqmp.c
index f8c4eb2b43f8..eb9ad5ae393f 100644
--- a/drivers/firmware/xilinx/zynqmp.c
+++ b/drivers/firmware/xilinx/zynqmp.c
@@ -18,6 +18,7 @@
 #include <linux/module.h>
 #include <linux/of.h>
 #include <linux/of_platform.h>
+#include <linux/platform_device.h>
 #include <linux/slab.h>
 #include <linux/uaccess.h>
 #include <linux/hashtable.h>
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] firmware: Explicitly include correct DT includes
  2023-07-14 17:44 [PATCH] firmware: Explicitly include correct DT includes Rob Herring
@ 2023-07-14 19:34 ` Dinh Nguyen
  2023-07-17  7:18 ` Thierry Reding
  2023-07-21 15:14 ` Thierry Reding
  2 siblings, 0 replies; 5+ messages in thread
From: Dinh Nguyen @ 2023-07-14 19:34 UTC (permalink / raw)
  To: Rob Herring, Sudeep Holla, Cristian Marussi, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, Matthias Brugger, AngeloGioacchino Del Regno,
	Florian Fainelli, Broadcom internal kernel review list,
	Thierry Reding, Jonathan Hunter, Michal Simek
  Cc: devicetree, linux-arm-kernel, linux-kernel, linux-mediatek,
	linux-rpi-kernel, linux-tegra



On 7/14/23 12:44, 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>
> ---
>   drivers/firmware/arm_scmi/driver.c | 4 ++--
>   drivers/firmware/imx/imx-dsp.c     | 1 -
>   drivers/firmware/imx/imx-scu-irq.c | 1 +
>   drivers/firmware/imx/imx-scu.c     | 1 +
>   drivers/firmware/mtk-adsp-ipc.c    | 1 -
>   drivers/firmware/raspberrypi.c     | 1 +
>   drivers/firmware/scpi_pm_domain.c  | 3 ++-
>   drivers/firmware/stratix10-rsu.c   | 1 -

For stratix10-rsu.c, Acked-by: Dinh Nguyen <dinguyen@kernel.org>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] firmware: Explicitly include correct DT includes
  2023-07-14 17:44 [PATCH] firmware: Explicitly include correct DT includes Rob Herring
  2023-07-14 19:34 ` Dinh Nguyen
@ 2023-07-17  7:18 ` Thierry Reding
  2023-07-21 15:14 ` Thierry Reding
  2 siblings, 0 replies; 5+ messages in thread
From: Thierry Reding @ 2023-07-17  7:18 UTC (permalink / raw)
  To: Rob Herring
  Cc: Sudeep Holla, Cristian Marussi, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Matthias Brugger, AngeloGioacchino Del Regno, Florian Fainelli,
	Broadcom internal kernel review list, Dinh Nguyen,
	Jonathan Hunter, Michal Simek, devicetree, linux-arm-kernel,
	linux-kernel, linux-mediatek, linux-rpi-kernel, linux-tegra

[-- Attachment #1: Type: text/plain, Size: 1230 bytes --]

On Fri, Jul 14, 2023 at 11:44:37AM -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>
> ---
>  drivers/firmware/arm_scmi/driver.c | 4 ++--
>  drivers/firmware/imx/imx-dsp.c     | 1 -
>  drivers/firmware/imx/imx-scu-irq.c | 1 +
>  drivers/firmware/imx/imx-scu.c     | 1 +
>  drivers/firmware/mtk-adsp-ipc.c    | 1 -
>  drivers/firmware/raspberrypi.c     | 1 +
>  drivers/firmware/scpi_pm_domain.c  | 3 ++-
>  drivers/firmware/stratix10-rsu.c   | 1 -
>  drivers/firmware/tegra/bpmp.c      | 3 +--
>  drivers/firmware/xilinx/zynqmp.c   | 1 +
>  10 files changed, 9 insertions(+), 8 deletions(-)

Acked-by: Thierry Reding <treding@nvidia.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] firmware: Explicitly include correct DT includes
  2023-07-14 17:44 [PATCH] firmware: Explicitly include correct DT includes Rob Herring
  2023-07-14 19:34 ` Dinh Nguyen
  2023-07-17  7:18 ` Thierry Reding
@ 2023-07-21 15:14 ` Thierry Reding
  2023-07-21 15:52   ` Arnd Bergmann
  2 siblings, 1 reply; 5+ messages in thread
From: Thierry Reding @ 2023-07-21 15:14 UTC (permalink / raw)
  To: Rob Herring, Arnd Bergmann, Olof Johansson
  Cc: Sudeep Holla, Cristian Marussi, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Matthias Brugger, AngeloGioacchino Del Regno, Florian Fainelli,
	Broadcom internal kernel review list, Dinh Nguyen,
	Jonathan Hunter, Michal Simek, devicetree, linux-arm-kernel,
	linux-kernel, linux-mediatek, linux-rpi-kernel, linux-tegra

[-- Attachment #1: Type: text/plain, Size: 1424 bytes --]

On Fri, Jul 14, 2023 at 11:44:37AM -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>
> ---
>  drivers/firmware/arm_scmi/driver.c | 4 ++--
>  drivers/firmware/imx/imx-dsp.c     | 1 -
>  drivers/firmware/imx/imx-scu-irq.c | 1 +
>  drivers/firmware/imx/imx-scu.c     | 1 +
>  drivers/firmware/mtk-adsp-ipc.c    | 1 -
>  drivers/firmware/raspberrypi.c     | 1 +
>  drivers/firmware/scpi_pm_domain.c  | 3 ++-
>  drivers/firmware/stratix10-rsu.c   | 1 -
>  drivers/firmware/tegra/bpmp.c      | 3 +--
>  drivers/firmware/xilinx/zynqmp.c   | 1 +
>  10 files changed, 9 insertions(+), 8 deletions(-)

Not sure about the other maintainers, but I usually pick up
firmware/tegra patches up through the Tegra tree and then they
ultimately go through ARM SoC.

Arnd, Olof, does it make sense for you guys to pick this up directly?

Thierry

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] firmware: Explicitly include correct DT includes
  2023-07-21 15:14 ` Thierry Reding
@ 2023-07-21 15:52   ` Arnd Bergmann
  0 siblings, 0 replies; 5+ messages in thread
From: Arnd Bergmann @ 2023-07-21 15:52 UTC (permalink / raw)
  To: Thierry Reding, Rob Herring, Olof Johansson
  Cc: Sudeep Holla, Cristian Marussi, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Matthias Brugger, AngeloGioacchino Del Regno, Florian Fainelli,
	Broadcom internal kernel review list, Dinh Nguyen, Jon Hunter,
	Michal Simek, devicetree, linux-arm-kernel, linux-kernel,
	linux-mediatek, linux-rpi-kernel, linux-tegra

On Fri, Jul 21, 2023, at 17:14, Thierry Reding wrote:
> On Fri, Jul 14, 2023 at 11:44:37AM -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>
>> ---
>>  drivers/firmware/arm_scmi/driver.c | 4 ++--
>>  drivers/firmware/imx/imx-dsp.c     | 1 -
>>  drivers/firmware/imx/imx-scu-irq.c | 1 +
>>  drivers/firmware/imx/imx-scu.c     | 1 +
>>  drivers/firmware/mtk-adsp-ipc.c    | 1 -
>>  drivers/firmware/raspberrypi.c     | 1 +
>>  drivers/firmware/scpi_pm_domain.c  | 3 ++-
>>  drivers/firmware/stratix10-rsu.c   | 1 -
>>  drivers/firmware/tegra/bpmp.c      | 3 +--
>>  drivers/firmware/xilinx/zynqmp.c   | 1 +
>>  10 files changed, 9 insertions(+), 8 deletions(-)
>
> Not sure about the other maintainers, but I usually pick up
> firmware/tegra patches up through the Tegra tree and then they
> ultimately go through ARM SoC.
>
> Arnd, Olof, does it make sense for you guys to pick this up directly?

Sure, I was going to suggest the same thing.

Rob, can you send the patch to soc@kernel.org assuming nobody
has objections? Feel free to send this together with the bits
for drivers/soc, drivers/bus, arch/arm/mach-*/ and anything else
that usually gets merged this way.

     Arnd

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-07-21 15:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-14 17:44 [PATCH] firmware: Explicitly include correct DT includes Rob Herring
2023-07-14 19:34 ` Dinh Nguyen
2023-07-17  7:18 ` Thierry Reding
2023-07-21 15:14 ` Thierry Reding
2023-07-21 15:52   ` Arnd Bergmann

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).