From: Suzuki K Poulose Date: Mon, 15 Jan 2018 10:51:16 +0000 (+0000) Subject: perf: dsu: Use signed field for dsu_pmu->num_counters X-Git-Tag: v5.15~9433^2~66 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a22fde8e979494f326e88ef0728367e009260d75;p=platform%2Fkernel%2Flinux-starfive.git perf: dsu: Use signed field for dsu_pmu->num_counters We set dsu_pmu->num_counters to -1, when the DSU is allocated but not initialised when none of the CPUs are active in the DSU. However, we use an unsigned field for num_counters. Switch this to a signed field. Fixes: 7520fa99246d ("perf: ARM DynamIQ Shared Unit PMU support") Reported-by: Dan Carpenter Cc: Mark Rutland Cc: Will Deacon Signed-off-by: Suzuki K Poulose Signed-off-by: Catalin Marinas --- diff --git a/drivers/perf/arm_dsu_pmu.c b/drivers/perf/arm_dsu_pmu.c index 37c0526..93c50e3 100644 --- a/drivers/perf/arm_dsu_pmu.c +++ b/drivers/perf/arm_dsu_pmu.c @@ -120,7 +120,7 @@ struct dsu_pmu { cpumask_t associated_cpus; cpumask_t active_cpu; struct hlist_node cpuhp_node; - u8 num_counters; + s8 num_counters; int irq; DECLARE_BITMAP(cpmceid_bitmap, DSU_PMU_MAX_COMMON_EVENTS); };