From: "Gustavo A. R. Silva" <gustavoars@kernel.org>
To: Will Deacon <will@kernel.org>
Cc: robin.murphy@arm.com, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/2] perf: arm-cmn: Fix unsigned comparison to less than zero
Date: Thu, 1 Oct 2020 10:45:33 -0500 [thread overview]
Message-ID: <20201001154533.GA11717@embeddedor> (raw)
In-Reply-To: <20201001110315.18505-1-will@kernel.org>
On Thu, Oct 01, 2020 at 12:03:14PM +0100, Will Deacon wrote:
> 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>
Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Thanks
--
Gustavo
> ---
> 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
prev parent reply other threads:[~2020-10-01 15:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Gustavo A. R. Silva [this message]
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=20201001154533.GA11717@embeddedor \
--to=gustavoars@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=robin.murphy@arm.com \
--cc=will@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.