Skip to contentSkip to conversation

drm/mm: include required headers in drm_mm.h

PATCH In review David Herrmann 1 participant 2 messages Jul 25, 2013 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 51f14693.g5HGdcuw2v3m8FOd%[email protected]

#1 lore raw

PATCH 1/1 drm/mm: include required headers in drm_mm.h

We need BUG_ON(), spinlock_t and standard kernel data-types so include the right headers.

---
 include/drm/drm_mm.h | 3 +++
 1 file changed, 3 insertions(+)
include/drm/drm_mm.h +3 -0
index a30c9aa..d3f0aa1 100644
@@ -36,7 +36,10 @@
 /*
  * Generic range manager structs
  */
+#include <linux/bug.h>
+#include <linux/kernel.h>
 #include <linux/list.h>
+#include <linux/spinlock.h>
 #ifdef CONFIG_DEBUG_FS
 #include <linux/seq_file.h>
 #endif
Signature · 1 line
1.8.3.3
#2 lore raw

This was meant as response to:

Subject: [drm-intel:drm-intel-nightly 154/166] include/drm/drm_mm.h:67:2:
error: unknown type name 'spinlock_t'
Message-ID: <51f14693.g5HGdcuw2v3m8FOd%[email protected]>

In case it didn't link to it correctly. Somehow this bug doesn't occur here on my machine, hmm. But I think fixing drm_mm.h is better than changing the include-order in drm_vma_manager.h, so this is what I did.

Quoted 26 lines · David Herrmann

We need BUG_ON(), spinlock_t and standard kernel data-types so include the right headers.

---
 include/drm/drm_mm.h | 3 +++
 1 file changed, 3 insertions(+)
include/drm/drm_mm.h +3 -1
index a30c9aa..d3f0aa1 100644
@@ -36,7 +36,10 @@
 /*
  * Generic range manager structs
  */
+#include <linux/bug.h>
+#include <linux/kernel.h>
 #include <linux/list.h>
+#include <linux/spinlock.h>
 #ifdef CONFIG_DEBUG_FS
 #include <linux/seq_file.h>
 #endif
--

1.8.3.3