Subject: [PATCH 1/2] perf: arm-cmn: Fix unsigned comparison to less than zero

From: Will Deacon <[email-masked]>
Date: Thu, 1 Oct 2020 12:03:14 +0100

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 <[email-masked]>
Signed-off-by: Will Deacon <[email-masked]>
---
 drivers/perf/arm-cmn.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;
 
-- 
2.28.0.709.gb0816b6eb0-goog

_______________________________________________
linux-arm-kernel mailing list
[email-masked]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel