Skip to contentSkip to conversation

drm: fixup headers_check

PATCH In review Felipe Balbi 4 participants 9 messages Jan 16, 2011

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

PATCH 1/2 drm: fixup headers_check

Drop the following headers_check errors:
/linux-2.6/usr/include/drm/drm_mode.h:85: found __[us]{8,16,32,64} type without #include <linux/types.h> /linux-2.6/usr/include/drm/i915_drm.h:120: found __[us]{8,16,32,64} type without #include <linux/types.h> /linux-2.6/usr/include/drm/mga_drm.h:260: found __[us]{8,16,32,64} type without #include <linux/types.h> /linux-2.6/usr/include/drm/radeon_drm.h:758: found __[us]{8,16,32,64} type without #include <linux/types.h> /linux-2.6/usr/include/drm/via_drm.h:117: found __[us]{8,16,32,64} type without #include <linux/types.h>

---
 include/drm/drm_mode.h   |    2 ++
 include/drm/i915_drm.h   |    1 +
 include/drm/mga_drm.h    |    1 +
 include/drm/radeon_drm.h |    1 +
 include/drm/via_drm.h    |    1 +
 5 files changed, 6 insertions(+), 0 deletions(-)
include/drm/drm_mode.h +2 -0
index 0fc7397..1678d7b 100644
@@ -27,6 +27,8 @@
 #ifndef _DRM_MODE_H
 #define _DRM_MODE_H
 
+#include <linux/types.h>
+
 #define DRM_DISPLAY_INFO_LEN	32
 #define DRM_CONNECTOR_NAME_LEN	32
 #define DRM_DISPLAY_MODE_LEN	32
include/drm/i915_drm.h +1 -0
index 0039f1f..4b211c8 100644
@@ -27,6 +27,7 @@
 #ifndef _I915_DRM_H_
 #define _I915_DRM_H_
 
+#include <linux/types.h>
 #include "drm.h"
 
 /* Please note that modifications to all structs defined here are
include/drm/mga_drm.h +1 -0
index c16097f..1107097 100644
@@ -35,6 +35,7 @@
 #ifndef __MGA_DRM_H__
 #define __MGA_DRM_H__
 
+#include <linux/types.h>
 #include "drm.h"
 
 /* WARNING: If you change any of these defines, make sure to change the
include/drm/radeon_drm.h +1 -0
index e95a86b..f9ec151 100644
@@ -33,6 +33,7 @@
 #ifndef __RADEON_DRM_H__
 #define __RADEON_DRM_H__
 
+#include <linux/types.h>
 #include "drm.h"
 
 /* WARNING: If you change any of these defines, make sure to change the
include/drm/via_drm.h +1 -0
index fd11a5b..23880b0 100644
@@ -24,6 +24,7 @@
 #ifndef _VIA_DRM_H_
 #define _VIA_DRM_H_
 
+#include <linux/types.h>
 #include "drm.h"
 
 /* WARNING: These defines must be the same as what the Xserver uses.
Signature · 1 line
1.7.3.4.598.g85356
#1 lore raw

PATCH 2/2 arm: omap: remove duplicated headers

A few headers are included twice, remove them.

Found the following errors using make includecheck:
arch/arm/mach-omap2/clock44xx_data.c: prm44xx.h is included more than once. arch/arm/mach-omap2/clockdomains44xx_data.c: cm1_44xx.h is included more than once. arch/arm/mach-omap2/clockdomains44xx_data.c: cm2_44xx.h is included more than once. arch/arm/mach-omap2/powerdomain2xxx_3xxx.c: prm-regbits-34xx.h is included more than once.

Cc Paul Walmsley <[email protected]>
Cc Tony Lindgren <[email protected]>
Cc Russell King <[email protected]>
Cc linux-omap at vger.kernel.org
Cc linux-arm-kernel at lists.infradead.org
Cc linux-kernel at vger.kernel.org
---
 arch/arm/mach-omap2/clock44xx_data.c        |    1 -
 arch/arm/mach-omap2/clockdomains44xx_data.c |    2 --
 arch/arm/mach-omap2/powerdomain2xxx_3xxx.c  |    1 -
 3 files changed, 0 insertions(+), 4 deletions(-)
arch/arm/mach-omap2/clock44xx_data.c +0 -1
index e8cb32f..de9ec8d 100644
@@ -34,7 +34,6 @@
 #include "cm2_44xx.h"
 #include "cm-regbits-44xx.h"
 #include "prm44xx.h"
-#include "prm44xx.h"
 #include "prm-regbits-44xx.h"
 #include "control.h"
 #include "scrm44xx.h"
arch/arm/mach-omap2/clockdomains44xx_data.c +0 -2
index 51920fc..10622c9 100644
@@ -30,8 +30,6 @@
 #include "cm1_44xx.h"
 #include "cm2_44xx.h"
 
-#include "cm1_44xx.h"
-#include "cm2_44xx.h"
 #include "cm-regbits-44xx.h"
 #include "prm44xx.h"
 #include "prcm44xx.h"
arch/arm/mach-omap2/powerdomain2xxx_3xxx.c +0 -1
index d523389..cf600e2 100644
@@ -19,7 +19,6 @@
 #include <plat/prcm.h>
 
 #include "powerdomain.h"
-#include "prm-regbits-34xx.h"
 #include "prm.h"
 #include "prm-regbits-24xx.h"
 #include "prm-regbits-34xx.h"
Signature · 1 line
1.7.3.4.598.g85356
maintainer
#2 lore raw

Re: [PATCH 2/2] arm: omap: remove duplicated headers

Quoted 11 lines · Felipe Balbi

A few headers are included twice, remove them.

Found the following errors using make includecheck:
arch/arm/mach-omap2/clock44xx_data.c: prm44xx.h is included more than once. arch/arm/mach-omap2/clockdomains44xx_data.c: cm1_44xx.h is included more than once. arch/arm/mach-omap2/clockdomains44xx_data.c: cm2_44xx.h is included more than once. arch/arm/mach-omap2/powerdomain2xxx_3xxx.c: prm-regbits-34xx.h is included more than once.

These are probably merge-related. I'll take this patch for 2.6.38-rc.

Thanks,

- Paul

#3 lore raw
In reply to Felipe Balbi

Hi,

Quoted 12 lines · Felipe Balbi

Drop the following headers_check errors:
/linux-2.6/usr/include/drm/drm_mode.h:85: found __[us]{8,16,32,64} type without #include <linux/types.h> /linux-2.6/usr/include/drm/i915_drm.h:120: found __[us]{8,16,32,64} type without #include <linux/types.h> /linux-2.6/usr/include/drm/mga_drm.h:260: found __[us]{8,16,32,64} type without #include <linux/types.h> /linux-2.6/usr/include/drm/radeon_drm.h:758: found __[us]{8,16,32,64} type without #include <linux/types.h> /linux-2.6/usr/include/drm/via_drm.h:117: found __[us]{8,16,32,64} type without #include <linux/types.h>

Quoted 5 lines

$SUBJECT shouldn't have number actually. Git added those automatically. Oh well, not a big deal.

Signature · 1 line
balbi
#4 lore raw
In reply to Felipe Balbi
Quoted 30 lines · Felipe Balbi

Drop the following headers_check errors:
/linux-2.6/usr/include/drm/drm_mode.h:85: found __[us]{8,16,32,64} type without #include <linux/types.h> /linux-2.6/usr/include/drm/i915_drm.h:120: found __[us]{8,16,32,64} type without #include <linux/types.h> /linux-2.6/usr/include/drm/mga_drm.h:260: found __[us]{8,16,32,64} type without #include <linux/types.h> /linux-2.6/usr/include/drm/radeon_drm.h:758: found __[us]{8,16,32,64} type without #include <linux/types.h> /linux-2.6/usr/include/drm/via_drm.h:117: found __[us]{8,16,32,64} type without #include <linux/types.h>

---
 include/drm/drm_mode.h   |    2 ++
 include/drm/i915_drm.h   |    1 +
 include/drm/mga_drm.h    |    1 +
 include/drm/radeon_drm.h |    1 +
 include/drm/via_drm.h    |    1 +
 5 files changed, 6 insertions(+), 0 deletions(-)
include/drm/drm_mode.h +0 -0
index 0fc7397..1678d7b 100644

include/drm/drm_mode.h line 31

Quoted 5 lines
include/drm/drm_mode.h +2 -0
@@ -27,6 +27,8 @@
 #ifndef _DRM_MODE_H
 #define _DRM_MODE_H
 
+#include <linux/types.h>
+

Would

#if 0
#include <linux/types.h> /* silence make header_check */ #endif

be an acceptable compromise?
-Chris

Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
#5 lore raw
Quoted 39 lines · Chris Wilson
Quoted 30 lines · Felipe Balbi

Drop the following headers_check errors:
/linux-2.6/usr/include/drm/drm_mode.h:85: found __[us]{8,16,32,64} type without #include <linux/types.h> /linux-2.6/usr/include/drm/i915_drm.h:120: found __[us]{8,16,32,64} type without #include <linux/types.h> /linux-2.6/usr/include/drm/mga_drm.h:260: found __[us]{8,16,32,64} type without #include <linux/types.h> /linux-2.6/usr/include/drm/radeon_drm.h:758: found __[us]{8,16,32,64} type without #include <linux/types.h> /linux-2.6/usr/include/drm/via_drm.h:117: found __[us]{8,16,32,64} type without #include <linux/types.h>

---
 include/drm/drm_mode.h   |    2 ++
 include/drm/i915_drm.h   |    1 +
 include/drm/mga_drm.h    |    1 +
 include/drm/radeon_drm.h |    1 +
 include/drm/via_drm.h    |    1 +
 5 files changed, 6 insertions(+), 0 deletions(-)
include/drm/drm_mode.h +0 -0
index 0fc7397..1678d7b 100644

include/drm/drm_mode.h line 31

Quoted 5 lines
include/drm/drm_mode.h +2 -0
@@ -27,6 +27,8 @@
 #ifndef _DRM_MODE_H
 #define _DRM_MODE_H
 
+#include <linux/types.h>
+

Would

Quoted 5 lines

#if 0
#include <linux/types.h> /* silence make header_check */ #endif

be an acceptable compromise?

Why would you want to do that ? I truly have those types in use. headers_check seems to be reporting correctly.

Signature · 1 line
balbi
#6 lore raw
Quoted 1 line · Felipe Balbi

I truly have those types in use.

I meant you :-p

Signature · 1 line
balbi
maintainer
#7 lore raw

I'll push the attached I think this time.

Dave.

From 1222ad4188aa2a6046da931487543507a59b7fac Mon Sep 17 00:00:00 2001
From: Dave Airlie <[email protected]>
Date: Sun, 16 Jan 2011 21:35:10 +1000
Subject: [PATCH] drm: add comments to stop pointless patches.

How about you fix the headers script to be recursive?

---
 include/drm/drm_mode.h   |    3 +++
 include/drm/i915_drm.h   |    1 +
 include/drm/mga_drm.h    |    1 +
 include/drm/radeon_drm.h |    1 +
 include/drm/via_drm.h    |    1 +
 5 files changed, 7 insertions(+), 0 deletions(-)
include/drm/drm_mode.h +3 -0
index 0fc7397..7a1f6c5 100644
@@ -27,6 +27,9 @@
 #ifndef _DRM_MODE_H
 #define _DRM_MODE_H
 
+/* this file doesn't need linux/types.h included */
+#include "drm.h"
+
 #define DRM_DISPLAY_INFO_LEN	32
 #define DRM_CONNECTOR_NAME_LEN	32
 #define DRM_DISPLAY_MODE_LEN	32
include/drm/i915_drm.h +1 -0
index 0039f1f..0da0420 100644
@@ -27,6 +27,7 @@
 #ifndef _I915_DRM_H_
 #define _I915_DRM_H_
 
+/* this file doesn't need linux/types.h included */
 #include "drm.h"
 
 /* Please note that modifications to all structs defined here are
include/drm/mga_drm.h +1 -0
index c16097f..41b4081 100644
@@ -35,6 +35,7 @@
 #ifndef __MGA_DRM_H__
 #define __MGA_DRM_H__
 
+/* this file doesn't need linux/types.h included */
 #include "drm.h"
 
 /* WARNING: If you change any of these defines, make sure to change the
include/drm/radeon_drm.h +1 -0
index e95a86b..c33f656 100644
@@ -33,6 +33,7 @@
 #ifndef __RADEON_DRM_H__
 #define __RADEON_DRM_H__
 
+/* this file doesn't need linux/types.h included */
 #include "drm.h"
 
 /* WARNING: If you change any of these defines, make sure to change the
include/drm/via_drm.h +1 -0
index fd11a5b..ccde589 100644
@@ -24,6 +24,7 @@
 #ifndef _VIA_DRM_H_
 #define _VIA_DRM_H_
 
+/* this file doesn't need linux/types.h included */
 #include "drm.h"
 
 /* WARNING: These defines must be the same as what the Xserver uses.
Signature · 1 line
1.7.2.3

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

#8 lore raw

Hi,

Quoted 1 line · Dave Airlie

I'll push the attached I think this time.

the point of headers_check is exactly to prevent indirect inclusion. This is even 1st topic o SubmitChecklist:

" 1: If you use a facility then #include the file that defines/declares that facility. Don't depend on other header files pulling in that you use."

Signature · 1 line
balbi