summaryrefslogtreecommitdiff
path: root/drivers/perf
diff options
context:
space:
mode:
authorWill Deacon <will@kernel.org>2020-10-01 11:54:54 +0100
committerWill Deacon <will@kernel.org>2020-10-01 22:29:53 +0100
commitd9ef632fab9ba81b708763bcbcfdbea9a55c95d2 (patch)
tree009a0ca1af059e4cc93e21a1b4e25be9afa4ec32 /drivers/perf
parentd8f6267f7ce5dc7b8920910e7e75216f77e06d21 (diff)
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;