summaryrefslogtreecommitdiffstats
path: root/drivers/perf
diff options
context:
space:
mode:
authorWill Deacon <will@kernel.org>2020-10-01 12:54:54 +0200
committerWill Deacon <will@kernel.org>2020-10-01 23:29:53 +0200
commitd9ef632fab9ba81b708763bcbcfdbea9a55c95d2 (patch)
tree009a0ca1af059e4cc93e21a1b4e25be9afa4ec32 /drivers/perf
parentarm_pmu: arm64: Use NMIs for PMU (diff)
downloadlinux-d9ef632fab9ba81b708763bcbcfdbea9a55c95d2.tar.xz
linux-d9ef632fab9ba81b708763bcbcfdbea9a55c95d2.zip
perf: arm-cmn: Fix unsigned comparison to less than zero
Ensure that the 'irq' field of 'struct arm_cmn_dtc' is a signed int so that it can be compared '< 0'. Link: https://lore.kernel.org/r/20200929170835.GA15956@embeddedor Addresses-Coverity-ID: 1497488 ("Unsigned compared against 0") Fixes: 0ba64770a2f2 ("perf: Add Arm CMN-600 PMU driver") Reported-by: Gustavo A. R. Silva <gustavoars@kernel.org> Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org> Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'drivers/perf')
-rw-r--r--drivers/perf/arm-cmn.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/perf/arm-cmn.c b/drivers/perf/arm-cmn.c
index e824b5b83ea2..cd4da4c5dac0 100644
--- a/drivers/perf/arm-cmn.c
+++ b/drivers/perf/arm-cmn.c
@@ -217,7 +217,7 @@ struct arm_cmn_node {
struct arm_cmn_dtc {
void __iomem *base;
- unsigned int irq;
+ int irq;
int irq_friend;
bool cc_active;