Skip to contentSkip to conversation

EDAC: armada_xp: Explicitly include correct DT includes

PATCH Applied Rob Herring 3 participants 3 messages Oct 13, 2023 – Nov 27, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 EDAC: armada_xp: Explicitly include correct DT includes

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.

---
 drivers/edac/armada_xp_edac.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/edac/armada_xp_edac.c +3 -1
index c4bd2fb9c46b..f18db536d58e 100644
@@ -5,7 +5,9 @@
 
 #include <linux/kernel.h>
 #include <linux/edac.h>
-#include <linux/of_platform.h>
+#include <linux/of.h>
+#include <linux/of_device.h>
+#include <linux/platform_device.h>
 
 #include <asm/hardware/cache-l2x0.h>
 #include <asm/hardware/cache-aurora-l2.h>
Signature · 1 line
2.42.0
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Rob Herring

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.

Sorry for the delay,
Jan

Quoted 19 lines

---
 drivers/edac/armada_xp_edac.c | 4 +++-

 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/edac/armada_xp_edac.c +0 -0
index c4bd2fb9c46b..f18db536d58e 100644
@@ -5,7 +5,9 @@


 #include <linux/kernel.h>
 #include <linux/edac.h>

drivers/edac/armada_xp_edac.c +3 -1
-#include <linux/of_platform.h>
+#include <linux/of.h>
+#include <linux/of_device.h>
+#include <linux/platform_device.h>


 #include <asm/hardware/cache-l2x0.h>
 #include <asm/hardware/cache-aurora-l2.h>

Signature · 4 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
maintainer Applied
#2 lore raw
In reply to Rob Herring
Quoted 9 lines · Rob Herring

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.

Quoted 4 lines
---
 drivers/edac/armada_xp_edac.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Applied, thanks.

Signature · 4 lines
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette