All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: Dave Airlie <airlied@redhat.com>,
	Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
	dri-devel <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH] drm: Fix undefined reference to drm_agp_clear() on non-AGP platforms
Date: Wed, 07 Aug 2013 14:39:40 +0200	[thread overview]
Message-ID: <1429663.aMUVjXR5F5@avalon> (raw)
In-Reply-To: <CAKMK7uEapKEr1HtDDsHLep2+dwnn-Ew_FYnBte2giWFsXV6WfA@mail.gmail.com>

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@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

  reply	other threads:[~2013-08-07 12:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-07 12:17 [PATCH] drm: Fix undefined reference to drm_agp_clear() on non-AGP platforms Laurent Pinchart
2013-08-07 12:19 ` Daniel Vetter
2013-08-07 12:39   ` Laurent Pinchart [this message]
2013-08-07 12:50     ` David Herrmann

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=1429663.aMUVjXR5F5@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=airlied@redhat.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=laurent.pinchart+renesas@ideasonboard.com \
    /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.