[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <163473661056.3411.12683931306376167461.git-patchwork-notify@kernel.org>
Date: Wed, 20 Oct 2021 13:30:10 +0000
From: patchwork-bot+netdevbpf@...nel.org
To: Tim Gardner <tim.gardner@...onical.com>
Cc: netdev@...r.kernel.org, ioana.ciornei@....com, Roy.Pledge@....com,
leoyang.li@....com, linux-kernel@...r.kernel.org,
linuxppc-dev@...ts.ozlabs.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH v2][net-next] soc: fsl: dpio: Unsigned compared against 0 in
qbman_swp_set_irq_coalescing()
Hello:
This patch was applied to netdev/net-next.git (master)
by David S. Miller <davem@...emloft.net>:
On Tue, 19 Oct 2021 06:19:25 -0600 you wrote:
> Coverity complains of unsigned compare against 0. There are 2 cases in
> this function:
>
> 1821 itp = (irq_holdoff * 1000) / p->desc->qman_256_cycles_per_ns;
>
> CID 121131 (#1 of 1): Unsigned compared against 0 (NO_EFFECT)
> unsigned_compare: This less-than-zero comparison of an unsigned value is never true. itp < 0U.
> 1822 if (itp < 0 || itp > 4096) {
> 1823 max_holdoff = (p->desc->qman_256_cycles_per_ns * 4096) / 1000;
> 1824 pr_err("irq_holdoff must be between 0..%dus\n", max_holdoff);
> 1825 return -EINVAL;
> 1826 }
> 1827
> unsigned_compare: This less-than-zero comparison of an unsigned value is never true. irq_threshold < 0U.
> 1828 if (irq_threshold >= p->dqrr.dqrr_size || irq_threshold < 0) {
> 1829 pr_err("irq_threshold must be between 0..%d\n",
> 1830 p->dqrr.dqrr_size - 1);
> 1831 return -EINVAL;
> 1832 }
>
> [...]
Here is the summary with links:
- [v2,net-next] soc: fsl: dpio: Unsigned compared against 0 in qbman_swp_set_irq_coalescing()
https://git.kernel.org/netdev/net-next/c/818a76a55d6e
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
Powered by blists - more mailing lists