[Intel-gfx] [PATCH 1/4] drm/i915/guc: Move shared data allocation away from submission path
Chris Wilson
chris at chris-wilson.co.uk
Mon Dec 11 15:17:44 UTC 2017
Quoting MichaĆ Winiarski (2017-12-11 15:12:53)
> +int intel_guc_init(struct intel_guc *guc)
> +{
> + struct drm_i915_private *dev_priv = guc_to_i915(guc);
> + int ret;
> +
> + ret = guc_shared_data_create(guc);
> + if (ret)
> + return ret;
> + GEM_BUG_ON(!guc->shared_data);
We don't have the early return if (allocated) now, so we don't need this
check to keep smatch quiet. You're welcome to keep it if you think it
reinforces that intel_guc_init() is responsible for allocating
guc->shared_data, which is fair enough (as I think it does help the
reader know what was allocated behind the scenes).
-Chris
More information about the Intel-gfx
mailing list