From: patchwork-bot+netdevbpf@kernel.org
To: Tim Gardner <tim.gardner@canonical.com>
Cc: netdev@vger.kernel.org, Roy.Pledge@nxp.com,
linux-kernel@vger.kernel.org, leoyang.li@nxp.com,
ioana.ciornei@nxp.com, linuxppc-dev@lists.ozlabs.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2][net-next] soc: fsl: dpio: Unsigned compared against 0 in qbman_swp_set_irq_coalescing()
Date: Wed, 20 Oct 2021 13:30:10 +0000 [thread overview]
Message-ID: <163473661056.3411.12683931306376167461.git-patchwork-notify@kernel.org> (raw)
In-Reply-To: <20211019121925.8910-1-tim.gardner@canonical.com>
Hello:
This patch was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.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
WARNING: multiple messages have this Message-ID (diff)
From: patchwork-bot+netdevbpf@kernel.org
To: Tim Gardner <tim.gardner@canonical.com>
Cc: netdev@vger.kernel.org, ioana.ciornei@nxp.com,
Roy.Pledge@nxp.com, leoyang.li@nxp.com,
linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2][net-next] soc: fsl: dpio: Unsigned compared against 0 in qbman_swp_set_irq_coalescing()
Date: Wed, 20 Oct 2021 13:30:10 +0000 [thread overview]
Message-ID: <163473661056.3411.12683931306376167461.git-patchwork-notify@kernel.org> (raw)
In-Reply-To: <20211019121925.8910-1-tim.gardner@canonical.com>
Hello:
This patch was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.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
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: patchwork-bot+netdevbpf@kernel.org
To: Tim Gardner <tim.gardner@canonical.com>
Cc: netdev@vger.kernel.org, ioana.ciornei@nxp.com,
Roy.Pledge@nxp.com, leoyang.li@nxp.com,
linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2][net-next] soc: fsl: dpio: Unsigned compared against 0 in qbman_swp_set_irq_coalescing()
Date: Wed, 20 Oct 2021 13:30:10 +0000 [thread overview]
Message-ID: <163473661056.3411.12683931306376167461.git-patchwork-notify@kernel.org> (raw)
In-Reply-To: <20211019121925.8910-1-tim.gardner@canonical.com>
Hello:
This patch was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.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
next prev parent reply other threads:[~2021-10-20 13:30 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-19 12:19 [PATCH v2][net-next] soc: fsl: dpio: Unsigned compared against 0 in qbman_swp_set_irq_coalescing() Tim Gardner
2021-10-19 12:19 ` Tim Gardner
2021-10-19 12:19 ` Tim Gardner
2021-10-19 18:39 ` Ioana Ciornei
2021-10-19 18:39 ` Ioana Ciornei
2021-10-19 18:39 ` Ioana Ciornei
2021-10-20 13:30 ` patchwork-bot+netdevbpf [this message]
2021-10-20 13:30 ` patchwork-bot+netdevbpf
2021-10-20 13:30 ` patchwork-bot+netdevbpf
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=163473661056.3411.12683931306376167461.git-patchwork-notify@kernel.org \
--to=patchwork-bot+netdevbpf@kernel.org \
--cc=Roy.Pledge@nxp.com \
--cc=ioana.ciornei@nxp.com \
--cc=leoyang.li@nxp.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=netdev@vger.kernel.org \
--cc=tim.gardner@canonical.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 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.