lkml.org 
[lkml]   [2020]   [Oct]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH][next] perf: arm-cmn: fix less than zero check on unsigned dtc->irq
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

\
 
 \ /
  Last update: 2020-10-05 10:26    [W:0.025 / U:0.288 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site