All of lore.kernel.org
 help / color / mirror / Atom feed
From: Damien Lespiau <damien.lespiau@intel.com>
To: Jani Nikula <jani.nikula@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Agnostic INTEL_INFO
Date: Wed, 2 Jul 2014 14:12:08 +0100	[thread overview]
Message-ID: <20140702131208.GA827@strange.amr.corp.intel.com> (raw)
In-Reply-To: <87y4wbex5n.fsf@intel.com>

On Wed, Jul 02, 2014 at 03:57:08PM +0300, Jani Nikula wrote:
> On Wed, 02 Jul 2014, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> > Adapt the macro so that we can pass either the struct drm_device or the
> > struct drm_i915_private pointers and get the answer we want.
> 
> Polymorphism?! :o
> 
> >    text    data     bss     dec     hex filename
> > 8138307 1234176  679936 10052419         996343 vmlinux.before
> > 8137591 1234176  679936 10051703         996077 vmlinux.after
> >
> > 700 bytes of code saving and peace of mind. Just don't look at the
> > macro.
> 
> I did. I think I need to get new glasses now.
> 
> I haven't yet decided whether this is really hideous or really
> cool. Maybe both.

I think I like my version (or a variation of the theme)
http://lists.freedesktop.org/archives/dri-devel/2014-January/051496.html
better, but after Daniel comment I abandoned the effort to not conflict
with his work.

I don't believe this moved on at all since, oh well.

I would think the explicit cast from __I915__(), __DRM__() are not
needed?

Maybe adding a BUILD_BUG_ON() checking the sizes of the 2 structures
would let us sleep at night. drm_device is unlikey to catch up any time
soon though.

-- 
Damien

  reply	other threads:[~2014-07-02 13:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-02 11:18 [PATCH] drm/i915: Agnostic INTEL_INFO Chris Wilson
2014-07-02 12:57 ` Jani Nikula
2014-07-02 13:12   ` Damien Lespiau [this message]
2014-07-02 13:17     ` Chris Wilson

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=20140702131208.GA827@strange.amr.corp.intel.com \
    --to=damien.lespiau@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.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.