From: Will Deacon <will@kernel.org>
To: linux-arm-kernel@lists.infradead.org
Cc: Will Deacon <will@kernel.org>,
robin.murphy@arm.com,
"Gustavo A . R . Silva" <gustavoars@kernel.org>
Subject: [PATCH 1/2] perf: arm-cmn: Fix unsigned comparison to less than zero
Date: Thu, 1 Oct 2020 12:03:14 +0100 [thread overview]
Message-ID: <20201001110315.18505-1-will@kernel.org> (raw)
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
next reply other threads:[~2020-10-01 11:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-01 11:03 Will Deacon [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201001110315.18505-1-will@kernel.org \
--to=will@kernel.org \
--cc=gustavoars@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=robin.murphy@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).