* [PATCH] drm/cma: include <drm/drmP.h> as needed
@ 2014-03-24 12:14 Shawn Guo
0 siblings, 0 replies; only message in thread
From: Shawn Guo @ 2014-03-24 12:14 UTC (permalink / raw)
To: linux-arm-kernel
The following error and warnings will be seen when compiling a C file
which includes <drm/drm_gem_cma_helper.h> but without <drm/drmP.h>
being included before.
include/drm/drm_gem_cma_helper.h:5:24: error: field ?base? has incomplete type
include/drm/drm_gem_cma_helper.h: In function ?to_drm_gem_cma_obj?:
include/drm/drm_gem_cma_helper.h:16:9: warning: initialization from incompatible pointer type [enabled by default]
include/drm/drm_gem_cma_helper.h: At top level:
include/drm/drm_gem_cma_helper.h:24:34: warning: ?struct drm_mode_create_dumb? declared inside parameter list [enabled by default]
include/drm/drm_gem_cma_helper.h:24:34: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
include/drm/drm_gem_cma_helper.h:24:34: warning: ?struct drm_device? declared inside parameter list [enabled by default]
include/drm/drm_gem_cma_helper.h:24:34: warning: ?struct drm_file? declared inside parameter list [enabled by default]
include/drm/drm_gem_cma_helper.h:28:10: warning: ?struct drm_device? declared inside parameter list [enabled by default]
include/drm/drm_gem_cma_helper.h:28:10: warning: ?struct drm_file? declared inside parameter list [enabled by default]
include/drm/drm_gem_cma_helper.h:35:3: warning: ?struct drm_device? declared inside parameter list [enabled by default]
include/drm/drm_gem_cma_helper.h:46:14: warning: ?struct drm_device? declared inside parameter list [enabled by default]
Fix them by including <drm/drmP.h> in drm_gem_cma_helper.h.
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
---
include/drm/drm_gem_cma_helper.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/drm/drm_gem_cma_helper.h b/include/drm/drm_gem_cma_helper.h
index 89b4d7d..2a3cea9 100644
--- a/include/drm/drm_gem_cma_helper.h
+++ b/include/drm/drm_gem_cma_helper.h
@@ -1,6 +1,8 @@
#ifndef __DRM_GEM_CMA_HELPER_H__
#define __DRM_GEM_CMA_HELPER_H__
+#include <drm/drmP.h>
+
struct drm_gem_cma_object {
struct drm_gem_object base;
dma_addr_t paddr;
--
1.8.3.2
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-03-24 12:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-24 12:14 [PATCH] drm/cma: include <drm/drmP.h> as needed Shawn Guo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).