[Intel-gfx] [PATCH v3 5/5] drm/i915/pmu: Support multiple GPUs

Chris Wilson chris at chris-wilson.co.uk
Thu Aug 1 15:43:17 UTC 2019


Quoting Tvrtko Ursulin (2019-08-01 16:08:04)
> @@ -1095,6 +1113,9 @@ void i915_pmu_register(struct drm_i915_private *i915)
>  
>  err_unreg:
>         perf_pmu_unregister(&pmu->base);
> +err_name:
> +       if (!is_igp(i915->drm.pdev))
> +               kfree_const(pmu->name);

With the kfree_const() magic you don't need to test again for !is_igp(),
it applies that for you by only freeing if it is not a static string.
-Chris


More information about the Intel-gfx mailing list