linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Will Deacon <will@kernel.org>
To: Colin King <colin.king@canonical.com>
Cc: Mark Rutland <mark.rutland@arm.com>,
	Robin Murphy <robin.murphy@arm.com>,
	linux-arm-kernel@lists.infradead.org,
	kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] perf: arm-cmn: fix less than zero check on unsigned dtc->irq
Date: Mon, 5 Oct 2020 09:26:04 +0100	[thread overview]
Message-ID: <20201005082603.GA23480@willie-the-truck> (raw)
In-Reply-To: <20201002154800.92607-1-colin.king@canonical.com>

On Fri, Oct 02, 2020 at 04:48:00PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> Currently the failure check on dtc->irq is always false because
> dtc->irq is an unsigned int. Fix this by using a temporary signed
> int for the less than zero error check.
> 
> Addresses-Coverity: ("Unsigned compared against 0")
> Fixes: 0ba64770a2f2 ("perf: Add Arm CMN-600 PMU driver")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  drivers/perf/arm-cmn.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)

Cheers, but Gustavo beat you to it and I had a crack at a different fix
which should now be in -next:

https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git/commit/?h=for-next/core&id=d9ef632fab9ba81b708763bcbcfdbea9a55c95d2

Will

      reply	other threads:[~2020-10-05  8:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-02 15:48 [PATCH][next] perf: arm-cmn: fix less than zero check on unsigned dtc->irq Colin King
2020-10-05  8:26 ` Will Deacon [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=20201005082603.GA23480@willie-the-truck \
    --to=will@kernel.org \
    --cc=colin.king@canonical.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --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).