linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] perf: arm-cmn: Fix unsigned comparison to less than zero
@ 2020-10-01 11:03 Will Deacon
  2020-10-01 11:03 ` [PATCH 2/2] perf: arm-cmn: Fix conversion specifiers for node type Will Deacon
  2020-10-01 15:45 ` [PATCH 1/2] perf: arm-cmn: Fix unsigned comparison to less than zero Gustavo A. R. Silva
  0 siblings, 2 replies; 3+ messages in thread
From: Will Deacon @ 2020-10-01 11:03 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: Will Deacon, robin.murphy, Gustavo A . R . Silva

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>
Signed-off-by: Will Deacon <will@kernel.org>
---
 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
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-10-01 15:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-01 11:03 [PATCH 1/2] perf: arm-cmn: Fix unsigned comparison to less than zero Will Deacon
2020-10-01 11:03 ` [PATCH 2/2] perf: arm-cmn: Fix conversion specifiers for node type Will Deacon
2020-10-01 15:45 ` [PATCH 1/2] perf: arm-cmn: Fix unsigned comparison to less than zero Gustavo A. R. Silva

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).