Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S269874AbUIDKao (ORCPT ); Sat, 4 Sep 2004 06:30:44 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S269875AbUIDKao (ORCPT ); Sat, 4 Sep 2004 06:30:44 -0400 Received: from holly.csn.ul.ie ([136.201.105.4]:59574 "EHLO holly.csn.ul.ie") by vger.kernel.org with ESMTP id S269874AbUIDKal (ORCPT ); Sat, 4 Sep 2004 06:30:41 -0400 Date: Sat, 4 Sep 2004 11:30:40 +0100 (IST) From: Dave Airlie X-X-Sender: airlied@skynet To: Arjan van de Ven Cc: linux-kernel@vger.kernel.org Subject: Re: [RFC/patch] macro_removal_agp_mtrr.diff In-Reply-To: <1094292878.2801.7.camel@laptop.fenrus.com> Message-ID: References: <1094292878.2801.7.camel@laptop.fenrus.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1399 Lines: 50 > it looks you can nuke most of those. > > -#if __REALLY_HAVE_AGP > > +#if __OS_HAS_AGP > > drm_agp_head_t *agp; /**< AGP data */ > > #endif > > for example does this extra pointer really hurt in the *really* unlikely > case you don't have AGP ? actually it's not just the pointer it is the structure drm_agp_head_t I think it needs some agp includes to work .. > if you make a drm_core_has_AGP and drm_core_has_MTRR wrapper around > these then... Will using inlines work in this case if the inline returns 0 will the compiler still do the removal... so something like static inline int drm_core_has_AGP(struct drm_device *dev) { #if __OS_HAS_AGP return drm_core_check_feature(dev, DRIVER_USE_AGP); #else return 0; } or the macro one #if __OS_HAS_AGP #define drm_core_has_AGP(dev) drm_core_check_feature(dev, DRIVER_USE_AGP) #else #define drm_core_has_AGP(dev) (0) #endif if the inline will work I'll be happier using it.. I just need to know it works for the range of compilers we use... Dave. -- David Airlie, Software Engineer http://www.skynet.ie/~airlied / airlied at skynet.ie pam_smb / Linux DECstation / Linux VAX / ILUG person - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/