From: Dave Gordon <david.s.gordon@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Mass convert dev->dev_private to to_i915(dev)
Date: Mon, 4 Jul 2016 10:53:26 +0100 [thread overview]
Message-ID: <577A3216.4090104@intel.com> (raw)
In-Reply-To: <1467386796-4296-1-git-send-email-chris@chris-wilson.co.uk>
On 01/07/16 16:26, Chris Wilson wrote:
> Since we now subclass struct drm_device, we can save pointer dances by
> noting the equivalence of struct drm_device and struct drm_i915_private,
> i.e. by using to_i915().
>
> text data bss dec hex filename
> 1073824 4562 416 1078802 107612 drivers/gpu/drm/i915/i915.ko
> 1068976 4562 416 1073954 106322 drivers/gpu/drm/i915/i915.ko
>
> Created by the coccinelle script:
>
> @@
> expression E;
> identifier p;
> @@
> - struct drm_i915_private *p = E->dev_private;
> + struct drm_i915_private *p = to_i915(E);
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
> drivers/gpu/drm/i915/i915_debugfs.c | 176 +++++++--------
> drivers/gpu/drm/i915/i915_drv.c | 36 ++--
> drivers/gpu/drm/i915/i915_gem.c | 54 ++---
> drivers/gpu/drm/i915/i915_gem_context.c | 10 +-
> drivers/gpu/drm/i915/i915_gem_execbuffer.c | 4 +-
> drivers/gpu/drm/i915/i915_gem_fence.c | 24 +--
> drivers/gpu/drm/i915/i915_gem_gtt.c | 20 +-
> drivers/gpu/drm/i915/i915_gem_stolen.c | 6 +-
> drivers/gpu/drm/i915/i915_gem_tiling.c | 4 +-
> drivers/gpu/drm/i915/i915_gpu_error.c | 6 +-
> drivers/gpu/drm/i915/i915_guc_submission.c | 4 +-
> drivers/gpu/drm/i915/i915_irq.c | 92 ++++----
> drivers/gpu/drm/i915/i915_suspend.c | 8 +-
> drivers/gpu/drm/i915/i915_sysfs.c | 22 +-
> drivers/gpu/drm/i915/intel_audio.c | 18 +-
> drivers/gpu/drm/i915/intel_color.c | 18 +-
> drivers/gpu/drm/i915/intel_crt.c | 24 +--
> drivers/gpu/drm/i915/intel_ddi.c | 36 ++--
> drivers/gpu/drm/i915/intel_display.c | 286 ++++++++++++-------------
> drivers/gpu/drm/i915/intel_dp.c | 107 +++++----
> drivers/gpu/drm/i915/intel_dp_mst.c | 6 +-
> drivers/gpu/drm/i915/intel_dpio_phy.c | 10 +-
> drivers/gpu/drm/i915/intel_dpll_mgr.c | 12 +-
> drivers/gpu/drm/i915/intel_drv.h | 4 +-
> drivers/gpu/drm/i915/intel_dsi.c | 36 ++--
> drivers/gpu/drm/i915/intel_dsi_dcs_backlight.c | 2 +-
> drivers/gpu/drm/i915/intel_dsi_panel_vbt.c | 6 +-
> drivers/gpu/drm/i915/intel_dsi_pll.c | 12 +-
> drivers/gpu/drm/i915/intel_dvo.c | 18 +-
> drivers/gpu/drm/i915/intel_fbc.c | 24 +--
> drivers/gpu/drm/i915/intel_fbdev.c | 10 +-
> drivers/gpu/drm/i915/intel_fifo_underrun.c | 18 +-
> drivers/gpu/drm/i915/intel_guc_loader.c | 6 +-
> drivers/gpu/drm/i915/intel_hdmi.c | 48 ++---
> drivers/gpu/drm/i915/intel_i2c.c | 6 +-
> drivers/gpu/drm/i915/intel_lrc.c | 4 +-
> drivers/gpu/drm/i915/intel_lvds.c | 16 +-
> drivers/gpu/drm/i915/intel_modes.c | 4 +-
> drivers/gpu/drm/i915/intel_overlay.c | 4 +-
> drivers/gpu/drm/i915/intel_panel.c | 6 +-
> drivers/gpu/drm/i915/intel_pm.c | 110 +++++-----
> drivers/gpu/drm/i915/intel_psr.c | 36 ++--
> drivers/gpu/drm/i915/intel_ringbuffer.c | 10 +-
> drivers/gpu/drm/i915/intel_sdvo.c | 22 +-
> drivers/gpu/drm/i915/intel_sprite.c | 18 +-
> drivers/gpu/drm/i915/intel_tv.c | 12 +-
> drivers/gpu/drm/i915/intel_uncore.c | 2 +-
> 47 files changed, 708 insertions(+), 709 deletions(-)
Looks fine :)
Reviewed-by: Dave Gordon <david.s.gordon@intel.com>
I found three more to convert, plus one place where we can delete
some entirely redundant locals, both 'dev' AND 'dev_priv' :)
.Dave.
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-07-04 9:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-01 15:26 [PATCH] drm/i915: Mass convert dev->dev_private to to_i915(dev) Chris Wilson
2016-07-01 15:49 ` ✓ Ro.CI.BAT: success for " Patchwork
2016-07-04 9:53 ` Dave Gordon [this message]
2016-07-04 9:59 ` [PATCH] drm/i915: convert a few more E->dev_private to to_i915(E) Dave Gordon
2016-07-04 10:35 ` Chris Wilson
2016-07-04 10:37 ` ✗ Ro.CI.BAT: failure for drm/i915: Mass convert dev->dev_private to to_i915(dev) (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=577A3216.4090104@intel.com \
--to=david.s.gordon@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.