All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Weinehall <david.weinehall@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 5/5 v3] drm/i915: debugfs spring cleaning
Date: Fri, 12 Aug 2016 15:36:10 +0300	[thread overview]
Message-ID: <20160812123610.iatuedvqw4gxiex3@boom> (raw)
In-Reply-To: <20160812120324.GC8335@nuc-i3427.alporthouse.com>

On Fri, Aug 12, 2016 at 01:03:24PM +0100, Chris Wilson wrote:
> On Fri, Aug 12, 2016 at 02:20:12PM +0300, David Weinehall wrote:
> > diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> > index d8cc52c7ddf8..3efc5af97231 100644
> > --- a/drivers/gpu/drm/i915/i915_drv.h
> > +++ b/drivers/gpu/drm/i915/i915_drv.h
> > @@ -2046,6 +2046,12 @@ static inline struct drm_i915_private *to_i915(const struct drm_device *dev)
> >  	return container_of(dev, struct drm_i915_private, drm);
> >  }
> >  
> > +static inline struct drm_i915_private *cast_to_i915(void *data)
> > +{
> > +	struct drm_device *dev = data;
> > +	return to_i915(dev);
> > +}
> 
> I wouldn't put this in i915_drv.h as this is very specific to the
> callsite, as it must know it has a void pointer to struct drm_device.
> Especially as to_i915() just works, right?

While it does indeed rely on the callsite, there are places outside
of i915_debugfs that could benefit from this (and if I remember
correctly my patch series that transitions things to dev_priv
makes use of it elsewhere.


Kind regards, David
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-08-12 12:36 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-08 13:19 [PATCH 0/5] Various cleanup David Weinehall
2016-08-08 13:19 ` [PATCH 1/5] drm/i915: Cosmetic fixes in i915_drv.h David Weinehall
2016-08-08 15:20   ` Chris Wilson
2016-08-08 13:19 ` [PATCH 2/5] drm/i915: Consistent struct device * naming David Weinehall
2016-08-08 15:21   ` Chris Wilson
2016-08-08 13:19 ` [PATCH 3/5] drm/i915: sysfs spring cleaning David Weinehall
2016-08-08 15:23   ` Chris Wilson
2016-08-09  7:45     ` David Weinehall
2016-08-09 10:52   ` [PATCH 3/5 v2] " David Weinehall
2016-08-08 13:20 ` [PATCH 4/5] drm/i915: pdev cleanup David Weinehall
2016-08-08 15:25   ` Chris Wilson
2016-08-12 11:10   ` [PATCH 4/5 v2] " David Weinehall
2016-08-12 12:15     ` Chris Wilson
2016-08-08 13:20 ` [PATCH 5/5] drm/i915: debugfs spring cleaning David Weinehall
2016-08-08 15:28   ` Chris Wilson
2016-08-09  7:46     ` David Weinehall
2016-08-09 10:52   ` [PATCH 5/5 v2] " David Weinehall
2016-08-12 11:20   ` [PATCH 5/5 v3] " David Weinehall
2016-08-12 12:03     ` Chris Wilson
2016-08-12 12:36       ` David Weinehall [this message]
2016-08-12 12:43     ` Dave Gordon
2016-08-12 12:55       ` David Weinehall
2016-08-15  9:14       ` David Weinehall
2016-08-15  9:11     ` [PATCH 5/5 v4] " David Weinehall
2016-08-08 13:48 ` ✗ Ro.CI.BAT: failure for Various cleanup (rev2) Patchwork

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=20160812123610.iatuedvqw4gxiex3@boom \
    --to=david.weinehall@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.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.