* [PATCH] DRM: Fix build error in include/drm/ttm/ttm_memory.h
@ 2009-12-02 12:56 Ralf Baechle
2009-12-02 13:21 ` Martin Michlmayr
0 siblings, 1 reply; 2+ messages in thread
From: Ralf Baechle @ 2009-12-02 12:56 UTC (permalink / raw)
To: Dave Airlie, Thomas Hellstrom, Jerome Glisse, Andrew Morton
Cc: linux-kernel, linux-mips
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 /home/ralf/src/linux/linux-mips/drivers/gpu/drm/ttm/ttm_memory.c:28:
/home/ralf/src/linux/linux-mips/include/drm/ttm/ttm_memory.h:154: warning: ‘struct page’ declared inside parameter list
/home/ralf/src/linux/linux-mips/include/drm/ttm/ttm_memory.h:154: warning: its scope is only this definition or declaration, which is probably not what you want
/home/ralf/src/linux/linux-mips/include/drm/ttm/ttm_memory.h:156: warning: ‘struct page’ declared inside parameter list
/home/ralf/src/linux/linux-mips/drivers/gpu/drm/ttm/ttm_memory.c:537: error: conflicting types for ‘ttm_mem_global_alloc_page’
/home/ralf/src/linux/linux-mips/include/drm/ttm/ttm_memory.h:152: note: previous declaration of ‘ttm_mem_global_alloc_page’ was here
/home/ralf/src/linux/linux-mips/drivers/gpu/drm/ttm/ttm_memory.c:560: error: conflicting types for ‘ttm_mem_global_free_page’
/home/ralf/src/linux/linux-mips/include/drm/ttm/ttm_memory.h:155: note: previous declaration of ‘ttm_mem_global_free_page’ was here
make[6]: *** [drivers/gpu/drm/ttm/ttm_memory.o] Error 1
make[5]: *** [drivers/gpu/drm/ttm] Error 2
make[4]: *** [drivers/gpu/drm] Error 2
make[3]: *** [drivers/gpu] Error 2
make[2]: *** [drivers] Error 2
make[1]: *** [sub-make] Error 2
make: *** [all] Error 2
Fixed by adding a forward declaration.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
include/drm/ttm/ttm_memory.h | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/include/drm/ttm/ttm_memory.h b/include/drm/ttm/ttm_memory.h
index 6983a7c..95355ee 100644
--- a/include/drm/ttm/ttm_memory.h
+++ b/include/drm/ttm/ttm_memory.h
@@ -143,6 +143,8 @@ static inline void ttm_mem_unregister_shrink(struct ttm_mem_global *glob,
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,
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] DRM: Fix build error in include/drm/ttm/ttm_memory.h
2009-12-02 12:56 [PATCH] DRM: Fix build error in include/drm/ttm/ttm_memory.h Ralf Baechle
@ 2009-12-02 13:21 ` Martin Michlmayr
0 siblings, 0 replies; 2+ messages in thread
From: Martin Michlmayr @ 2009-12-02 13:21 UTC (permalink / raw)
To: Ralf Baechle
Cc: Dave Airlie, Thomas Hellstrom, Jerome Glisse, Andrew Morton,
linux-kernel, linux-mips
* Ralf Baechle <ralf@linux-mips.org> [2009-12-02 12:56]:
> 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:
I sent such a patch several weeks ago but unfortunately it hasn't been
applied yet:
http://www.mail-archive.com/dri-devel@lists.sourceforge.net/msg44711.html
--
Martin Michlmayr
http://www.cyrius.com/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-12-02 13:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-02 12:56 [PATCH] DRM: Fix build error in include/drm/ttm/ttm_memory.h Ralf Baechle
2009-12-02 13:21 ` Martin Michlmayr
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®