diff mbox

[11/20] drm: order includes alphabetically in drmP.h

Message ID 1409307166-12396-12-git-send-email-dh.herrmann@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

David Herrmann Aug. 29, 2014, 10:12 a.m. UTC
It is hardly possible to review the drmP.h includes, anymore. Order them
alphabetically, linux/ first, then asm/ and then local drm/ includes.

Since a long time ago, kernel headers have been converted to include
required headers themselves. No-one cares whether that means the compiler
has to include a header multiple times. In fact, GCC already does some
optimization regarding multiple inclusions if a sorrounding #ifndef is
present.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
---
 include/drm/drmP.h | 46 +++++++++++++++++++++++-----------------------
 1 file changed, 23 insertions(+), 23 deletions(-)

Comments

Thierry Reding Aug. 29, 2014, 12:05 p.m. UTC | #1
On Fri, Aug 29, 2014 at 12:12:37PM +0200, David Herrmann wrote:
> It is hardly possible to review the drmP.h includes, anymore. Order them
> alphabetically, linux/ first, then asm/ and then local drm/ includes.
> 
> Since a long time ago, kernel headers have been converted to include
> required headers themselves. No-one cares whether that means the compiler
> has to include a header multiple times. In fact, GCC already does some
> optimization regarding multiple inclusions if a sorrounding #ifndef is
> present.
> 
> Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
> ---
>  include/drm/drmP.h | 46 +++++++++++++++++++++++-----------------------
>  1 file changed, 23 insertions(+), 23 deletions(-)

This looks good, but I don't think I'm going to bother manually checking
each of those. Provided everything still complies, this is at least:

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

Patch

diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index c6f337c..8b3f3b7 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -35,38 +35,42 @@ 
 #ifndef _DRM_P_H_
 #define _DRM_P_H_
 
-#include <linux/sched.h>
-#include <linux/kernel.h>
-#include <linux/kref.h>
-#include <linux/miscdevice.h>
+#include <linux/agp_backend.h>
+#include <linux/cdev.h>
+#include <linux/dma-mapping.h>
+#include <linux/file.h>
 #include <linux/fs.h>
+#include <linux/highmem.h>
+#include <linux/idr.h>
 #include <linux/init.h>
-#include <linux/file.h>
-#include <linux/platform_device.h>
-#include <linux/pci.h>
+#include <linux/io.h>
 #include <linux/jiffies.h>
-#include <linux/dma-mapping.h>
+#include <linux/kernel.h>
+#include <linux/kref.h>
+#include <linux/miscdevice.h>
 #include <linux/mm.h>
-#include <linux/cdev.h>
 #include <linux/mutex.h>
-#include <linux/io.h>
-#include <linux/slab.h>
+#include <linux/pci.h>
+#include <linux/platform_device.h>
+#include <linux/poll.h>
 #include <linux/ratelimit.h>
-#include <asm/mman.h>
-#include <asm/uaccess.h>
+#include <linux/sched.h>
+#include <linux/slab.h>
 #include <linux/types.h>
-#include <linux/agp_backend.h>
-#include <linux/workqueue.h>
-#include <linux/poll.h>
-#include <linux/highmem.h>
 #include <linux/vmalloc.h>
+#include <linux/workqueue.h>
+
+#include <asm/mman.h>
 #include <asm/pgalloc.h>
+#include <asm/uaccess.h>
+
 #include <drm/drm.h>
+#include <drm/drm_hashtab.h>
+#include <drm/drm_mm.h>
+#include <drm/drm_os_linux.h>
 #include <drm/drm_sarea.h>
 #include <drm/drm_vma_manager.h>
 
-#include <linux/idr.h>
-
 struct module;
 
 struct drm_file;
@@ -77,10 +81,6 @@  struct device_node;
 struct videomode;
 struct reservation_object;
 
-#include <drm/drm_os_linux.h>
-#include <drm/drm_hashtab.h>
-#include <drm/drm_mm.h>
-
 /*
  * 4 debug categories are defined:
  *