[PATCH] drm: Fix undefined reference to drm_agp_clear() on non-AGP platforms
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Wed Aug 7 05:39:40 PDT 2013
Hi Daniel,
On Wednesday 07 August 2013 14:19:34 Daniel Vetter wrote:
> On Wed, Aug 7, 2013 at 2:17 PM, Laurent Pinchart wrote:
> > The drm_agp_clear() function is only defined on platforms with AGP
> > support. Move the drm_core_has_AGP() check from drm_agp_clear() to the
> > caller to let the compiler optimize the drm_agp_clear() call away.
> >
> > Signed-off-by: Laurent Pinchart
> > <laurent.pinchart+renesas at ideasonboard.com>
>
> Can't we use the usual approach of an empty static inline helper for
> the !CONFIG_AGP case here?
Sure, that's possible as well. I find my solution slightly more explicit as it
shows that drm_agp_clear() will only be called for platforms that have AGP,
but I would be fine with a static inline as well.
--
Regards,
Laurent Pinchart
More information about the dri-devel
mailing list