From: Will Deacon Date: Thu, 1 Oct 2020 10:54:54 +0000 (+0100) Subject: perf: arm-cmn: Fix unsigned comparison to less than zero X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=d9ef632fab9ba81b708763bcbcfdbea9a55c95d2;p=linux.git perf: arm-cmn: Fix unsigned comparison to less than zero 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 Reviewed-by: Gustavo A. R. Silva Signed-off-by: Will Deacon --- diff --git a/drivers/perf/arm-cmn.c b/drivers/perf/arm-cmn.c index e824b5b83ea25..cd4da4c5dac04 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;