Skip to contentSkip to conversation

drm: etnaviv: Replace of_platform.h with explicit includes

PATCH Applied Rob Herring 3 participants 6 messages Apr 10, 2023 – Jun 21, 2023

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

PATCH 1/1 drm: etnaviv: Replace of_platform.h with explicit includes

Etnaviv doesn't use anything from of_platform.h, but depends on of.h, of_device.h, and platform_device.h which are all implicitly included, but that is going to be removed soon.

---
 drivers/gpu/drm/etnaviv/etnaviv_drv.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/etnaviv/etnaviv_drv.c +3 -1
index 44ca803237a5..c68e83ed5a23 100644
@@ -6,7 +6,9 @@
 #include <linux/component.h>
 #include <linux/dma-mapping.h>
 #include <linux/module.h>
-#include <linux/of_platform.h>
+#include <linux/of.h>
+#include <linux/of_device.h>
+#include <linux/platform_device.h>
 #include <linux/uaccess.h>
 
 #include <drm/drm_debugfs.h>
Signature · 1 line
2.39.2
#1 lore raw
Quoted 9 lines · Rob Herring

Etnaviv doesn't use anything from of_platform.h, but depends on of.h, of_device.h, and platform_device.h which are all implicitly included, but that is going to be removed soon.

---
 drivers/gpu/drm/etnaviv/etnaviv_drv.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Ping!

Quoted 19 lines
drivers/gpu/drm/etnaviv/etnaviv_drv.c +3 -2
index 44ca803237a5..c68e83ed5a23 100644
@@ -6,7 +6,9 @@
 #include <linux/component.h>
 #include <linux/dma-mapping.h>
 #include <linux/module.h>
-#include <linux/of_platform.h>
+#include <linux/of.h>
+#include <linux/of_device.h>
+#include <linux/platform_device.h>
 #include <linux/uaccess.h>
 
 #include <drm/drm_debugfs.h>
--

2.39.2

Reviewed-by
#2 lore raw
Quoted 10 lines · Rob Herring
Quoted 8 lines · Rob Herring

Etnaviv doesn't use anything from of_platform.h, but depends on of.h, of_device.h, and platform_device.h which are all implicitly included, but that is going to be removed soon.

---
  drivers/gpu/drm/etnaviv/etnaviv_drv.c | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)

Ping!

of_device.h already has 'linux/of.h' and 'linux/platform_device.h' included,

Would it be sufficient by simply including linux/of_device.h ?

I'm fine with the above question explained.

```

#include <linux/platform_device.h>
#include <linux/of_platform.h> /* temporary until merge */

#include <linux/of.h>

```
Quoted 18 lines
Quoted 18 lines
drivers/gpu/drm/etnaviv/etnaviv_drv.c +3 -2
index 44ca803237a5..c68e83ed5a23 100644
@@ -6,7 +6,9 @@
  #include <linux/component.h>
  #include <linux/dma-mapping.h>
  #include <linux/module.h>
-#include <linux/of_platform.h>
+#include <linux/of.h>
+#include <linux/of_device.h>
+#include <linux/platform_device.h>
  #include <linux/uaccess.h>
 
  #include <drm/drm_debugfs.h>
--

2.39.2

Signature · 1 line
Jingfeng
#3 lore raw
Quoted 14 lines · Sui Jingfeng
Quoted 9 lines · Rob Herring
Quoted 8 lines · Rob Herring

Etnaviv doesn't use anything from of_platform.h, but depends on of.h, of_device.h, and platform_device.h which are all implicitly included, but that is going to be removed soon.

---
  drivers/gpu/drm/etnaviv/etnaviv_drv.c | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)
Quoted 6 lines
Quoted 1 line

Ping!

of_device.h already has 'linux/of.h' and 'linux/platform_device.h' included,

Would it be sufficient by simply including linux/of_device.h ?

That's part of what I'm trying to remove. Standard practice is to not rely on implicit includes.

Rob

Tested-by
#4 lore raw
Quoted 14 lines · Rob Herring
Quoted 13 lines · Sui Jingfeng
Quoted 9 lines · Rob Herring
Quoted 8 lines · Rob Herring

Etnaviv doesn't use anything from of_platform.h, but depends on of.h, of_device.h, and platform_device.h which are all implicitly included, but that is going to be removed soon.

---
   drivers/gpu/drm/etnaviv/etnaviv_drv.c | 4 +++-
   1 file changed, 3 insertions(+), 1 deletion(-)
Quoted 7 lines
Quoted 5 lines
Quoted 1 line

Ping!

of_device.h already has 'linux/of.h' and 'linux/platform_device.h' included,

Would it be sufficient by simply including linux/of_device.h ?

That's part of what I'm trying to remove. Standard practice is to not rely on implicit includes.

Ok, that's fine then.

Quoted 1 line

Rob

Signature · 1 line
Jingfeng
maintainer Applied
#5 lore raw
In reply to Rob Herring

Am Freitag, dem 09.06.2023 um 14:17 -0600 schrieb Rob Herring:

Quoted 6 lines · Rob Herring
Quoted 5 lines

Etnaviv doesn't use anything from of_platform.h, but depends on of.h, of_device.h, and platform_device.h which are all implicitly included, but that is going to be removed soon.

Quoted 6 lines
Quoted 4 lines
---
 drivers/gpu/drm/etnaviv/etnaviv_drv.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Ping!

Thanks, applied to etnaviv/next.

Regards,
Lucas

Quoted 20 lines
Quoted 20 lines
drivers/gpu/drm/etnaviv/etnaviv_drv.c +3 -2
index 44ca803237a5..c68e83ed5a23 100644
@@ -6,7 +6,9 @@
 #include <linux/component.h>
 #include <linux/dma-mapping.h>
 #include <linux/module.h>
-#include <linux/of_platform.h>
+#include <linux/of.h>
+#include <linux/of_device.h>
+#include <linux/platform_device.h>
 #include <linux/uaccess.h>
 
 #include <drm/drm_debugfs.h>
--

2.39.2