Skip to contentSkip to conversation

drm/armada: Remove unused #include <drmP.h>

PATCH Applied Haneen Mohammed 3 participants 5 messages Sep 27, 2017 – Oct 2, 2017

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

PATCH 1/1 drm/armada: Remove unused #include <drmP.h>

Remove drmP.h as it is not needed anymore since nothing it defines is used in these files.

---
 drivers/gpu/drm/armada/armada_510.c   | 1 -
 drivers/gpu/drm/armada/armada_drv.c   | 1 -
 drivers/gpu/drm/armada/armada_fb.c    | 1 -
 drivers/gpu/drm/armada/armada_fbdev.c | 1 -
 drivers/gpu/drm/armada/armada_gem.c   | 1 -
 5 files changed, 5 deletions(-)
drivers/gpu/drm/armada/armada_510.c +0 -1
index ad3d2eb..41a784f 100644
@@ -9,7 +9,6 @@
  */
 #include <linux/clk.h>
 #include <linux/io.h>
-#include <drm/drmP.h>
 #include <drm/drm_crtc_helper.h>
 #include "armada_crtc.h"
 #include "armada_drm.h"
drivers/gpu/drm/armada/armada_drv.c +0 -1
index c993bcc..17bb675 100644
@@ -9,7 +9,6 @@
 #include <linux/component.h>
 #include <linux/module.h>
 #include <linux/of_graph.h>
-#include <drm/drmP.h>
 #include <drm/drm_crtc_helper.h>
 #include <drm/drm_of.h>
 #include "armada_crtc.h"
drivers/gpu/drm/armada/armada_fb.c +0 -1
index 51839c1..a38d5a0 100644
@@ -5,7 +5,6 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
-#include <drm/drmP.h>
 #include <drm/drm_crtc_helper.h>
 #include <drm/drm_fb_helper.h>
 #include "armada_drm.h"
drivers/gpu/drm/armada/armada_fbdev.c +0 -1
index cf6bad1..a2ce83f 100644
@@ -10,7 +10,6 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 
-#include <drm/drmP.h>
 #include <drm/drm_fb_helper.h>
 #include "armada_crtc.h"
 #include "armada_drm.h"
drivers/gpu/drm/armada/armada_gem.c +0 -1
index 49d40aa..190280e 100644
@@ -8,7 +8,6 @@
 #include <linux/dma-buf.h>
 #include <linux/dma-mapping.h>
 #include <linux/shmem_fs.h>
-#include <drm/drmP.h>
 #include "armada_drm.h"
 #include "armada_gem.h"
 #include <drm/armada_drm.h>
Signature · 1 line
2.7.4
#1 lore raw
Quoted 4 lines · Haneen Mohammed

Remove drmP.h as it is not needed anymore since nothing it defines is used in these files.

Applied, thanks.
-Daniel

Quoted 71 lines
---
 drivers/gpu/drm/armada/armada_510.c   | 1 -
 drivers/gpu/drm/armada/armada_drv.c   | 1 -
 drivers/gpu/drm/armada/armada_fb.c    | 1 -
 drivers/gpu/drm/armada/armada_fbdev.c | 1 -
 drivers/gpu/drm/armada/armada_gem.c   | 1 -
 5 files changed, 5 deletions(-)
drivers/gpu/drm/armada/armada_510.c +0 -1
index ad3d2eb..41a784f 100644
@@ -9,7 +9,6 @@
  */
 #include <linux/clk.h>
 #include <linux/io.h>
-#include <drm/drmP.h>
 #include <drm/drm_crtc_helper.h>
 #include "armada_crtc.h"
 #include "armada_drm.h"
drivers/gpu/drm/armada/armada_drv.c +0 -1
index c993bcc..17bb675 100644
@@ -9,7 +9,6 @@
 #include <linux/component.h>
 #include <linux/module.h>
 #include <linux/of_graph.h>
-#include <drm/drmP.h>
 #include <drm/drm_crtc_helper.h>
 #include <drm/drm_of.h>
 #include "armada_crtc.h"
drivers/gpu/drm/armada/armada_fb.c +0 -1
index 51839c1..a38d5a0 100644
@@ -5,7 +5,6 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
-#include <drm/drmP.h>
 #include <drm/drm_crtc_helper.h>
 #include <drm/drm_fb_helper.h>
 #include "armada_drm.h"
drivers/gpu/drm/armada/armada_fbdev.c +0 -1
index cf6bad1..a2ce83f 100644
@@ -10,7 +10,6 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 
-#include <drm/drmP.h>
 #include <drm/drm_fb_helper.h>
 #include "armada_crtc.h"
 #include "armada_drm.h"
drivers/gpu/drm/armada/armada_gem.c +0 -1
index 49d40aa..190280e 100644
@@ -8,7 +8,6 @@
 #include <linux/dma-buf.h>
 #include <linux/dma-mapping.h>
 #include <linux/shmem_fs.h>
-#include <drm/drmP.h>
 #include "armada_drm.h"
 #include "armada_gem.h"
 #include <drm/armada_drm.h>
Signature · 1 line
2.7.4
Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
#2 lore raw

Den 29.09.2017 09.25, skrev Daniel Vetter:

Quoted 6 lines · Haneen Mohammed
Quoted 4 lines

Remove drmP.h as it is not needed anymore since nothing it defines is used in these files.

Applied, thanks.

drivers/gpu/drm/armada/armada_fb.c uses DRM_ERROR() which is defined in include/drm/drmP.h. Doesn't that warrant an inclusion?

Noralf.

Quoted 72 lines

-Daniel

Quoted 71 lines
---
  drivers/gpu/drm/armada/armada_510.c   | 1 -
  drivers/gpu/drm/armada/armada_drv.c   | 1 -
  drivers/gpu/drm/armada/armada_fb.c    | 1 -
  drivers/gpu/drm/armada/armada_fbdev.c | 1 -
  drivers/gpu/drm/armada/armada_gem.c   | 1 -
  5 files changed, 5 deletions(-)
drivers/gpu/drm/armada/armada_510.c +0 -1
index ad3d2eb..41a784f 100644
@@ -9,7 +9,6 @@
   */
  #include <linux/clk.h>
  #include <linux/io.h>
-#include <drm/drmP.h>
  #include <drm/drm_crtc_helper.h>
  #include "armada_crtc.h"
  #include "armada_drm.h"
drivers/gpu/drm/armada/armada_drv.c +0 -1
index c993bcc..17bb675 100644
@@ -9,7 +9,6 @@
  #include <linux/component.h>
  #include <linux/module.h>
  #include <linux/of_graph.h>
-#include <drm/drmP.h>
  #include <drm/drm_crtc_helper.h>
  #include <drm/drm_of.h>
  #include "armada_crtc.h"
drivers/gpu/drm/armada/armada_fb.c +0 -1
index 51839c1..a38d5a0 100644
@@ -5,7 +5,6 @@
   * it under the terms of the GNU General Public License version 2 as
   * published by the Free Software Foundation.
   */
-#include <drm/drmP.h>
  #include <drm/drm_crtc_helper.h>
  #include <drm/drm_fb_helper.h>
  #include "armada_drm.h"
drivers/gpu/drm/armada/armada_fbdev.c +0 -1
index cf6bad1..a2ce83f 100644
@@ -10,7 +10,6 @@
  #include <linux/kernel.h>
  #include <linux/module.h>
 
-#include <drm/drmP.h>
  #include <drm/drm_fb_helper.h>
  #include "armada_crtc.h"
  #include "armada_drm.h"
drivers/gpu/drm/armada/armada_gem.c +0 -1
index 49d40aa..190280e 100644
@@ -8,7 +8,6 @@
  #include <linux/dma-buf.h>
  #include <linux/dma-mapping.h>
  #include <linux/shmem_fs.h>
-#include <drm/drmP.h>
  #include "armada_drm.h"
  #include "armada_gem.h"
  #include <drm/armada_drm.h>
Signature · 1 line
2.7.4
#3 lore raw
Quoted 6 lines · Noralf Trønnes

Den 29.09.2017 09.25, skrev Daniel Vetter:

Quoted 4 lines · Haneen Mohammed
Quoted 3 lines

Remove drmP.h as it is not needed anymore since nothing it defines is used in these files.

Quoted 9 lines
Quoted 2 lines
Quoted 1 line

Applied, thanks.

drivers/gpu/drm/armada/armada_fb.c uses DRM_ERROR() which is defined in include/drm/drmP.h. Doesn't that warrant an inclusion?

Noralf.

Quoted 1 line

-Daniel

Actually most of them do use DRM_ERROR. It's my mistake, I did not check every function, and just relied on not getting an error when compiled.

But this would mean almost all the files would need to include the drmP.h then, since they are encouraged to use DRM_DEV_*, right?

Quoted 62 lines
Quoted 62 lines
Quoted 62 lines
---
 drivers/gpu/drm/armada/armada_510.c   | 1 -
 drivers/gpu/drm/armada/armada_drv.c   | 1 -
 drivers/gpu/drm/armada/armada_fb.c    | 1 -
 drivers/gpu/drm/armada/armada_fbdev.c | 1 -
 drivers/gpu/drm/armada/armada_gem.c   | 1 -
 5 files changed, 5 deletions(-)
drivers/gpu/drm/armada/armada_510.c +0 -1
index ad3d2eb..41a784f 100644
@@ -9,7 +9,6 @@
  */
 #include <linux/clk.h>
 #include <linux/io.h>
-#include <drm/drmP.h>
 #include <drm/drm_crtc_helper.h>
 #include "armada_crtc.h"
 #include "armada_drm.h"
drivers/gpu/drm/armada/armada_drv.c +0 -1
index c993bcc..17bb675 100644
@@ -9,7 +9,6 @@
 #include <linux/component.h>
 #include <linux/module.h>
 #include <linux/of_graph.h>
-#include <drm/drmP.h>
 #include <drm/drm_crtc_helper.h>
 #include <drm/drm_of.h>
 #include "armada_crtc.h"
drivers/gpu/drm/armada/armada_fb.c +0 -1
index 51839c1..a38d5a0 100644
@@ -5,7 +5,6 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
-#include <drm/drmP.h>
 #include <drm/drm_crtc_helper.h>
 #include <drm/drm_fb_helper.h>
 #include "armada_drm.h"
drivers/gpu/drm/armada/armada_fbdev.c +0 -1
index cf6bad1..a2ce83f 100644
@@ -10,7 +10,6 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <drm/drmP.h>
 #include <drm/drm_fb_helper.h>
 #include "armada_crtc.h"
 #include "armada_drm.h"
drivers/gpu/drm/armada/armada_gem.c +0 -0
index 49d40aa..190280e 100644
@@ -8,7 +8,6 @@
 #include <linux/dma-buf.h>
 #include <linux/dma-mapping.h>
Quoted 9 lines
Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/armada/armada_gem.c +0 -1
 #include <linux/shmem_fs.h>
-#include <drm/drmP.h>
 #include "armada_drm.h"
 #include "armada_gem.h"
 #include <drm/armada_drm.h>
Signature · 1 line
2.7.4

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#4 lore raw
Quoted 15 lines · Haneen Mohammed
Quoted 14 lines · Noralf Trønnes

Den 29.09.2017 09.25, skrev Daniel Vetter:

Quoted 6 lines · Haneen Mohammed
Quoted 4 lines

Remove drmP.h as it is not needed anymore since nothing it defines is used in these files.

Applied, thanks.

drivers/gpu/drm/armada/armada_fb.c uses DRM_ERROR() which is defined in include/drm/drmP.h. Doesn't that warrant an inclusion?

Noralf.

Quoted 7 lines
Quoted 1 line
Quoted 1 line

-Daniel

Actually most of them do use DRM_ERROR. It's my mistake, I did not check every function, and just relied on not getting an error when compiled.

But this would mean almost all the files would need to include the drmP.h then, since they are encouraged to use DRM_DEV_*, right?

We still need to split out the last few bits of drmP.h, then there'd just be a drm_debug.h or similar helper for this stuff. -Daniel

Quoted 72 lines
Quoted 72 lines
Quoted 71 lines
Quoted 71 lines
---
 drivers/gpu/drm/armada/armada_510.c   | 1 -
 drivers/gpu/drm/armada/armada_drv.c   | 1 -
 drivers/gpu/drm/armada/armada_fb.c    | 1 -
 drivers/gpu/drm/armada/armada_fbdev.c | 1 -
 drivers/gpu/drm/armada/armada_gem.c   | 1 -
 5 files changed, 5 deletions(-)
drivers/gpu/drm/armada/armada_510.c +0 -1
index ad3d2eb..41a784f 100644
@@ -9,7 +9,6 @@
  */
 #include <linux/clk.h>
 #include <linux/io.h>
-#include <drm/drmP.h>
 #include <drm/drm_crtc_helper.h>
 #include "armada_crtc.h"
 #include "armada_drm.h"
drivers/gpu/drm/armada/armada_drv.c +0 -1
index c993bcc..17bb675 100644
@@ -9,7 +9,6 @@
 #include <linux/component.h>
 #include <linux/module.h>
 #include <linux/of_graph.h>
-#include <drm/drmP.h>
 #include <drm/drm_crtc_helper.h>
 #include <drm/drm_of.h>
 #include "armada_crtc.h"
drivers/gpu/drm/armada/armada_fb.c +0 -1
index 51839c1..a38d5a0 100644
@@ -5,7 +5,6 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
-#include <drm/drmP.h>
 #include <drm/drm_crtc_helper.h>
 #include <drm/drm_fb_helper.h>
 #include "armada_drm.h"
drivers/gpu/drm/armada/armada_fbdev.c +0 -1
index cf6bad1..a2ce83f 100644
@@ -10,7 +10,6 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <drm/drmP.h>
 #include <drm/drm_fb_helper.h>
 #include "armada_crtc.h"
 #include "armada_drm.h"
drivers/gpu/drm/armada/armada_gem.c +0 -1
index 49d40aa..190280e 100644
@@ -8,7 +8,6 @@
 #include <linux/dma-buf.h>
 #include <linux/dma-mapping.h>
 #include <linux/shmem_fs.h>
-#include <drm/drmP.h>
 #include "armada_drm.h"
 #include "armada_gem.h"
 #include <drm/armada_drm.h>
Signature · 1 line
2.7.4
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel