Merge tag 'bitmap-for-5.19-rc1' of https://github.com/norov/linux
[platform/kernel/linux-starfive.git] / drivers / gpu / drm / i915 / i915_pmu.c
index 3e3b095..958b371 100644 (file)
@@ -1047,7 +1047,7 @@ static int i915_pmu_cpu_online(unsigned int cpu, struct hlist_node *node)
        GEM_BUG_ON(!pmu->base.event_init);
 
        /* Select the first online CPU as a designated reader. */
-       if (!cpumask_weight(&i915_pmu_cpumask))
+       if (cpumask_empty(&i915_pmu_cpumask))
                cpumask_set_cpu(cpu, &i915_pmu_cpumask);
 
        return 0;