From mboxrd@z Thu Jan 1 00:00:00 1970 From: Laurent Pinchart Subject: Re: [PATCH] drm: Fix undefined reference to drm_agp_clear() on non-AGP platforms Date: Wed, 07 Aug 2013 14:39:40 +0200 Message-ID: <1429663.aMUVjXR5F5@avalon> References: <1375877860-25203-1-git-send-email-laurent.pinchart+renesas@ideasonboard.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [95.142.166.194]) by gabe.freedesktop.org (Postfix) with ESMTP id B72CDE643F for ; Wed, 7 Aug 2013 05:38:35 -0700 (PDT) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: Daniel Vetter Cc: Dave Airlie , Laurent Pinchart , dri-devel List-Id: dri-devel@lists.freedesktop.org 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 > > > > 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