Skip to contentSkip to conversation

soc: samsung: Explicitly include correct DT includes

PATCH Applied Rob Herring 3 participants 3 messages Jul 14, 2023 – Jul 20, 2023 Arm Samsung Exynos

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 soc: samsung: 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 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.

---
 drivers/soc/samsung/exynos-chipid.c | 1 -
 drivers/soc/samsung/exynos-pmu.c    | 2 +-
 drivers/soc/samsung/pm_domains.c    | 3 ++-
 3 files changed, 3 insertions(+), 3 deletions(-)
drivers/soc/samsung/exynos-chipid.c +0 -1
index 0fb3631e7346..7ba45c4aff97 100644
@@ -17,7 +17,6 @@
 #include <linux/mfd/syscon.h>
 #include <linux/module.h>
 #include <linux/of.h>
-#include <linux/of_device.h>
 #include <linux/platform_device.h>
 #include <linux/regmap.h>
 #include <linux/slab.h>
drivers/soc/samsung/exynos-pmu.c +1 -1
index 5b2664da9853..250537d7cfd6 100644
@@ -7,9 +7,9 @@
 
 #include <linux/of.h>
 #include <linux/of_address.h>
-#include <linux/of_device.h>
 #include <linux/mfd/core.h>
 #include <linux/mfd/syscon.h>
+#include <linux/of_platform.h>
 #include <linux/platform_device.h>
 #include <linux/delay.h>
 
drivers/soc/samsung/pm_domains.c +2 -1
index d07f3c9d6903..9b502e8751d1 100644
@@ -11,11 +11,12 @@
 
 #include <linux/io.h>
 #include <linux/err.h>
+#include <linux/platform_device.h>
 #include <linux/slab.h>
 #include <linux/pm_domain.h>
 #include <linux/delay.h>
+#include <linux/of.h>
 #include <linux/of_address.h>
-#include <linux/of_platform.h>
 #include <linux/pm_runtime.h>
 
 struct exynos_pm_domain_config {
Signature · 7 lines
2.40.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
reviewer Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines

-----Original Message-----
From: Rob Herring <[email protected]>
Sent: Friday, July 14, 2023 11:22 PM
To: Krzysztof Kozlowski <[email protected]>; Alim Akhtar <[email protected]>
Cc: [email protected]; [email protected];

linux-

Quoted 6 lines

[email protected]; [email protected]
Subject: [PATCH] soc: samsung: 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 as merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they

"temporarily"

Quoted 1 line

include each other. They also include platform_device.h and of.h. As a

result,

Quoted 1 line

there's a pretty much random mix of those include files used throughout

the

Quoted 1 line

tree. In order to detangle these headers and replace the implicit includes

with

Quoted 1 line

struct declarations, users need to explicitly include the correct

includes.

Quoted 3 lines

---

Review

Quoted 6 lines
 drivers/soc/samsung/exynos-chipid.c | 1 -
 drivers/soc/samsung/exynos-pmu.c    | 2 +-
 drivers/soc/samsung/pm_domains.c    | 3 ++-
 3 files changed, 3 insertions(+), 3 deletions(-)
(quoted diff) +0 -0

b/drivers/soc/samsung/exynos-

Review

Quoted 13 lines

chipid.c
index 0fb3631e7346..7ba45c4aff97 100644

drivers/soc/samsung/exynos-chipid.c +0 -1
@@ -17,7 +17,6 @@
 #include <linux/mfd/syscon.h>
 #include <linux/module.h>
 #include <linux/of.h>
-#include <linux/of_device.h>
 #include <linux/platform_device.h>
 #include <linux/regmap.h>
 #include <linux/slab.h>
(quoted diff) +0 -0

b/drivers/soc/samsung/exynos-

Quoted 36 lines

pmu.c
index 5b2664da9853..250537d7cfd6 100644

drivers/soc/samsung/exynos-pmu.c +1 -1
@@ -7,9 +7,9 @@
 
 #include <linux/of.h>
 #include <linux/of_address.h>
-#include <linux/of_device.h>
 #include <linux/mfd/core.h>
 #include <linux/mfd/syscon.h>
+#include <linux/of_platform.h>
 #include <linux/platform_device.h>
 #include <linux/delay.h>
 
drivers/soc/samsung/pm_domains.c +2 -2
index d07f3c9d6903..9b502e8751d1 100644
@@ -11,11 +11,12 @@
 
 #include <linux/io.h>
 #include <linux/err.h>
+#include <linux/platform_device.h>
 #include <linux/slab.h>
 #include <linux/pm_domain.h>
 #include <linux/delay.h>
+#include <linux/of.h>
 #include <linux/of_address.h>
-#include <linux/of_platform.h>
 #include <linux/pm_runtime.h>
 
 struct exynos_pm_domain_config {
--

2.40.1

#2 lore raw
In reply to Rob Herring
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 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.

[...]

Applied, thanks!

[1/1] soc: samsung: Explicitly include correct DT includes

      https://git.kernel.org/krzk/linux/c/4c4458375c5633954eda8fb9e7d31d56836b2bbd

Best regards,

Signature · 6 lines
Krzysztof Kozlowski <[email protected]>

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel