From: Ralf Baechle <r...@linux-mips.org>

include/drm/ttm/ttm_memory.h uses struct page * without having included
the required headers or a forward declaration resulting in the following
build error for mtx1_defconfig on Linus' master branch, possibly others:

  CC [M]  drivers/gpu/drm/ttm/ttm_memory.o
In file included from drivers/gpu/drm/ttm/ttm_memory.c:28:
include/drm/ttm/ttm_memory.h:154: warning: `struct page' declared inside 
parameter list
include/drm/ttm/ttm_memory.h:154: warning: its scope is only this definition or 
declaration, which is probably not what you want
include/drm/ttm/ttm_memory.h:156: warning: `struct page' declared inside 
parameter list
drivers/gpu/drm/ttm/ttm_memory.c:537: error: conflicting types for 
`ttm_mem_global_alloc_page'
include/drm/ttm/ttm_memory.h:152: note: previous declaration of 
`ttm_mem_global_alloc_page' was here
drivers/gpu/drm/ttm/ttm_memory.c:560: error: conflicting types for 
`ttm_mem_global_free_page'
include/drm/ttm/ttm_memory.h:155: note: previous declaration of 
`ttm_mem_global_free_page' was here

Fixed by adding a forward declaration.

Signed-off-by: Ralf Baechle <r...@linux-mips.org>
Cc: Dave Airlie <airl...@linux.ie>
Signed-off-by: Andrew Morton <a...@linux-foundation.org>
---

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

diff -puN 
include/drm/ttm/ttm_memory.h~drm-fix-build-error-in-include-drm-ttm-ttm_memoryh 
include/drm/ttm/ttm_memory.h
--- 
a/include/drm/ttm/ttm_memory.h~drm-fix-build-error-in-include-drm-ttm-ttm_memoryh
+++ a/include/drm/ttm/ttm_memory.h
@@ -144,6 +144,8 @@ static inline void ttm_mem_unregister_sh
        spin_unlock(&glob->lock);
 }
 
+struct page;
+
 extern int ttm_mem_global_init(struct ttm_mem_global *glob);
 extern void ttm_mem_global_release(struct ttm_mem_global *glob);
 extern int ttm_mem_global_alloc(struct ttm_mem_global *glob, uint64_t memory,
_

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to