Skip to contentSkip to conversation

drm/ttm: declare 'struct device' in ttm_page_alloc.h

PATCH In review Alexandre Courbot 3 participants 3 messages Feb 9, 2014 – Feb 20, 2014

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

PATCH 1/1 drm/ttm: declare 'struct device' in ttm_page_alloc.h

Declare 'struct device' explicitly in ttm_page_alloc.h as this file does not include any file declaring it. This removes the following warning:

warning: 'struct device' declared inside parameter list

---
This warning was visible when compiling Nouveau on -next today.

 include/drm/ttm/ttm_page_alloc.h | 2 ++
 1 file changed, 2 insertions(+)
include/drm/ttm/ttm_page_alloc.h +2 -0
index d1f61bf..49a8284 100644
@@ -29,6 +29,8 @@
 #include <drm/ttm/ttm_bo_driver.h>
 #include <drm/ttm/ttm_memory.h>
 
+struct device;
+
 /**
  * Initialize pool allocator.
  */
Signature · 1 line
1.8.5.4
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Alexandre Courbot

Declare 'struct device' explicitly in ttm_page_alloc.h as this file does not include any file declaring it. This removes the following warning:

Quoted 8 lines

warning: 'struct device' declared inside parameter list

---
This warning was visible when compiling Nouveau on -next today.

 include/drm/ttm/ttm_page_alloc.h | 2 ++
 1 file changed, 2 insertions(+)

I don't think I've seen this on x86, but I've certainly encountered the same warning when building nouveau on ARM, so:

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

#2 lore raw

Ping, David?

Quoted 18 lines · Thierry Reding
Quoted 4 lines · Alexandre Courbot

Declare 'struct device' explicitly in ttm_page_alloc.h as this file does not include any file declaring it. This removes the following warning:

Quoted 8 lines

warning: 'struct device' declared inside parameter list

---
This warning was visible when compiling Nouveau on -next today.

 include/drm/ttm/ttm_page_alloc.h | 2 ++
 1 file changed, 2 insertions(+)

I don't think I've seen this on x86, but I've certainly encountered the same warning when building nouveau on ARM, so: