Re: [PATCH] drm/i915: prefer INTEL_GEN(dev_priv) to INTEL_INFO(dev)->gen

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Sep 09, 2016 at 10:37:46PM +0100, Dave Gordon wrote:
> More Coccinellery ...
> 
> Wherever we find "INTEL_INFO(dev)->gen", and have a suitable
> "dev_priv" in scope, replace it with "INTEL_GEN(dev_priv)",
> which is the preferred wasy to access this device property.
> 
> This patch covers all the files that contained only relatively
> few instances, and where no manual fixup was required. A few
> more complex instances may be updated in a later patch.
> 
> @dev_priv_param@
> function FUNC;
> idexpression struct drm_device *DEV;

Oh. That's how you catch those.

> identifier DEV_PRIV;
> @@
> FUNC(..., struct drm_i915_private *DEV_PRIV, ...)
> {
>     <...
> -   INTEL_INFO(DEV)->gen
> +   INTEL_GEN(DEV_PRIV)
>     ...>
> }
> 
> @dev_priv_local@
> idexpression struct drm_device *DEV;
> identifier DEV_PRIV;
> expression E;
> @@
> {
>     ...
> (
>     struct drm_i915_private *DEV_PRIV;
> |
>     struct drm_i915_private *DEV_PRIV = E;
> )
>     <...
> -   INTEL_INFO(DEV)->gen
> +   INTEL_GEN(DEV_PRIV)
>     ...>
> }

Looks good, will have to wait until just after another merge point so
that we can apply to dinq (as well as applies to nightly).

Nothing appeared out-of-place running this against intel_display.c, just
a residual unused struct drm_dev.

Reviewed-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux