DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/bnxt: fix incorrect boolean operator usage
@ 2020-10-22 18:45 Lance Richardson
  2020-10-26  4:09 ` Ajit Khaparde
  0 siblings, 1 reply; 2+ messages in thread
From: Lance Richardson @ 2020-10-22 18:45 UTC (permalink / raw)
  To: Ajit Khaparde, Somnath Kotur; +Cc: dev

Use boolean AND operator instead of bitwise operator.

Coverity issue: 323488
Fixes: b42c15c83e88 ("net/bnxt: support trusted VF")
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index aa2d9e00e..3ee4b5524 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -1547,7 +1547,7 @@ static int bnxt_mac_addr_add_op(struct rte_eth_dev *eth_dev,
 	if (rc)
 		return rc;
 
-	if (BNXT_VF(bp) & !BNXT_VF_IS_TRUSTED(bp)) {
+	if (BNXT_VF(bp) && !BNXT_VF_IS_TRUSTED(bp)) {
 		PMD_DRV_LOG(ERR, "Cannot add MAC address to a VF interface\n");
 		return -ENOTSUP;
 	}
-- 
2.25.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] [PATCH] net/bnxt: fix incorrect boolean operator usage
  2020-10-22 18:45 [dpdk-dev] [PATCH] net/bnxt: fix incorrect boolean operator usage Lance Richardson
@ 2020-10-26  4:09 ` Ajit Khaparde
  0 siblings, 0 replies; 2+ messages in thread
From: Ajit Khaparde @ 2020-10-26  4:09 UTC (permalink / raw)
  To: Lance Richardson; +Cc: Somnath Kotur, dpdk-dev

On Thu, Oct 22, 2020 at 11:45 AM Lance Richardson
<lance.richardson@broadcom.com> wrote:
>
> Use boolean AND operator instead of bitwise operator.
>
> Coverity issue: 323488
> Fixes: b42c15c83e88 ("net/bnxt: support trusted VF")
> Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
> Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Patch applied to dpdk-next-net-brcm.

> ---
>  drivers/net/bnxt/bnxt_ethdev.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
> index aa2d9e00e..3ee4b5524 100644
> --- a/drivers/net/bnxt/bnxt_ethdev.c
> +++ b/drivers/net/bnxt/bnxt_ethdev.c
> @@ -1547,7 +1547,7 @@ static int bnxt_mac_addr_add_op(struct rte_eth_dev *eth_dev,
>         if (rc)
>                 return rc;
>
> -       if (BNXT_VF(bp) & !BNXT_VF_IS_TRUSTED(bp)) {
> +       if (BNXT_VF(bp) && !BNXT_VF_IS_TRUSTED(bp)) {
>                 PMD_DRV_LOG(ERR, "Cannot add MAC address to a VF interface\n");
>                 return -ENOTSUP;
>         }
> --
> 2.25.1
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-10-26  4:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-22 18:45 [dpdk-dev] [PATCH] net/bnxt: fix incorrect boolean operator usage Lance Richardson
2020-10-26  4:09 ` Ajit Khaparde

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git