Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm: Fix compilation warning caused by static inline forward declaration

The drm_crtc_mask() function used in <drm/drm_encoder.h> is a static
inline defined in <drm/drm_crtc.h>. If the first header is included in a
compilation unit without the second one, the following compilation
warning will be issued.

In file included from <linux>/drivers/gpu/drm/drm_bridge.c:29:0:
<linux>/include/drm/drm_encoder.h:192:95: warning: ‘drm_crtc_mask’ used but never defined
static inline uint32_t drm_crtc_mask(const struct drm_crtc *crtc);

Fix this by including the header defining the function instead of using
a forward declaration.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Archit Taneja <architt@codeaurora.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1481709550-29226-3-git-send-email-laurent.pinchart+renesas@ideasonboard.com

authored by

Laurent Pinchart and committed by
Archit Taneja
2407d1dc 9338203c

+1 -3
+1 -3
include/drm/drm_encoder.h
··· 25 25 26 26 #include <linux/list.h> 27 27 #include <linux/ctype.h> 28 + #include <drm/drm_crtc.h> 28 29 #include <drm/drm_mode.h> 29 30 #include <drm/drm_mode_object.h> 30 31 ··· 191 190 { 192 191 return encoder->index; 193 192 } 194 - 195 - /* FIXME: We have an include file mess still, drm_crtc.h needs untangling. */ 196 - static inline uint32_t drm_crtc_mask(const struct drm_crtc *crtc); 197 193 198 194 /** 199 195 * drm_encoder_crtc_ok - can a given crtc drive a given encoder?