All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arjan van de Ven <arjanv@redhat.com>
To: Dave Airlie <airlied@linux.ie>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [RFC/patch] macro_removal_agp_mtrr.diff
Date: Sat, 4 Sep 2004 12:36:48 +0200	[thread overview]
Message-ID: <20040904103648.GC5313@devserv.devel.redhat.com> (raw)
In-Reply-To: <Pine.LNX.4.58.0409041126500.25475@skynet>

[-- Attachment #1: Type: text/plain, Size: 867 bytes --]

On Sat, Sep 04, 2004 at 11:30:40AM +0100, Dave Airlie wrote:
> 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...

please do not put ifdefs inside functions; 
how about

#if __OS_HAS_AGP
static inline int drm_core_has_AGP(struct drm_device *dev)
{
	return drm_core_check_feature(dev, DRIVER_USE_AGP);
}
#else
#define drm_core_has_AGP(dev) 0
#endif


where you can make the later an inline if you really want to but I don't see
the point.


[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

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

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-04 10:02 [RFC/patch] macro_removal_agp_mtrr.diff 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
2004-09-04 10:36     ` Arjan van de Ven [this message]
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=20040904103648.GC5313@devserv.devel.redhat.com \
    --to=arjanv@redhat.com \
    --cc=airlied@linux.ie \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.