mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dave Airlie <airlied@linux.ie>
To: Arjan van de Ven <arjanv@redhat.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [RFC/patch] macro_removal_agp_mtrr.diff
Date: Sat, 4 Sep 2004 11:30:40 +0100 (IST)	[thread overview]
Message-ID: <Pine.LNX.4.58.0409041126500.25475@skynet> (raw)
In-Reply-To: <1094292878.2801.7.camel@laptop.fenrus.com>

> 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


  parent reply	other threads:[~2004-09-04 10:30 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-04 10:02 Dave Airlie
2004-09-04 10:11 ` Christoph Hellwig
2004-09-04 10:14 ` Arjan van de Ven
2004-09-04 10:21   ` Dave Airlie
2004-09-04 10:30   ` Dave Airlie [this message]
2004-09-04 10:36     ` Arjan van de Ven
2004-09-04 10:37     ` Arjan van de Ven
2004-09-04 13:23       ` Dave Airlie
2004-09-04 13:30         ` Arjan van de Ven
2004-09-04 15:47         ` Gene Heskett
2004-09-04 16:33           ` Alan Cox
2004-09-04 22:04             ` Lee Revell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.58.0409041126500.25475@skynet \
    --to=airlied@linux.ie \
    --cc=arjanv@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®