[Intel-gfx] [PATCH 2/2] drm/i915: replace for_each_engine()

Chris Wilson chris at chris-wilson.co.uk
Wed Mar 23 20:43:51 UTC 2016


On Wed, Mar 23, 2016 at 06:19:54PM +0000, Dave Gordon wrote:
> @@ -2023,8 +2025,11 @@ static inline struct drm_i915_private *guc_to_i915(struct intel_guc *guc)
>  
>  /* Iterator over subset of engines selected by mask */
>  #define for_each_engine_masked(engine__, dev_priv__, mask__) \
> -	for ((engine__) = &dev_priv->engine[0]; (engine__) < &dev_priv->engine[I915_NUM_ENGINES]; (engine__)++) \
> -		for_each_if (intel_engine_flag((engine__)) & (mask__) && intel_engine_initialized((engine__)))
> +	for ((engine__) = &dev_priv->engine[0]; \
> +	     (engine__) < &dev_priv->engine[I915_NUM_ENGINES]; \
> +	     (engine__)++) \
> +		for_each_if (((mask__) & intel_engine_flag(engine__)) && \
> +			     intel_engine_initialized(engine__))

You've touched it, might as well fix it!
	s/dev_priv/(dev_priv__)/

With the macro fixed, both patches
Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list