DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
To: Lance Richardson <lance.richardson@broadcom.com>
Cc: Somnath Kotur <somnath.kotur@broadcom.com>, dpdk-dev <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] net/bnxt: fix incorrect boolean operator usage
Date: Sun, 25 Oct 2020 21:09:23 -0700	[thread overview]
Message-ID: <CACZ4nhv_FtGCmBPBx2TKzWx=Nt+XV03Fzf9TLcyb2Shf4Ex_Ew@mail.gmail.com> (raw)
In-Reply-To: <20201022184510.182976-1-lance.richardson@broadcom.com>

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
>

      reply	other threads:[~2020-10-26  4:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-22 18:45 Lance Richardson
2020-10-26  4:09 ` Ajit Khaparde [this message]

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='CACZ4nhv_FtGCmBPBx2TKzWx=Nt+XV03Fzf9TLcyb2Shf4Ex_Ew@mail.gmail.com' \
    --to=ajit.khaparde@broadcom.com \
    --cc=dev@dpdk.org \
    --cc=lance.richardson@broadcom.com \
    --cc=somnath.kotur@broadcom.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).