From: Ajit Khaparde <ajit.khaparde@broadcom.com>
To: dev@dpdk.org
Cc: Mike Baucom <michael.baucom@broadcom.com>, stable@dpdk.org
Subject: [dpdk-dev] [PATCH] net/bnxt: fix incorrect assignment
Date: Thu, 12 Nov 2020 07:29:45 -0800 [thread overview]
Message-ID: <20201112152945.99066-1-ajit.khaparde@broadcom.com> (raw)
From: Mike Baucom <michael.baucom@broadcom.com>
Use comparison operator instead of incorrectly using the assignment
operator.
Coverity issue: 363566
Coverity issue: 363577
Fixes: 42c40f8902f7 ("net/bnxt: consolidate template table processing")
Cc: stable@dpdk.org
Signed-off-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/tf_ulp/ulp_mapper.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/bnxt/tf_ulp/ulp_mapper.c b/drivers/net/bnxt/tf_ulp/ulp_mapper.c
index 29643232d8..429e7fcfee 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_mapper.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_mapper.c
@@ -2522,7 +2522,7 @@ ulp_mapper_tbls_process(struct bnxt_ulp_mapper_parms *parms, uint32_t tid)
tbls = ulp_mapper_tbl_list_get(parms, tid, &num_tbls);
if (!tbls || !num_tbls) {
BNXT_TF_DBG(ERR, "No %s tables for %d:%d\n",
- (parms->tmpl_type = BNXT_ULP_TEMPLATE_TYPE_CLASS) ?
+ (parms->tmpl_type == BNXT_ULP_TEMPLATE_TYPE_CLASS) ?
"class" : "action", parms->dev_id, tid);
return -EINVAL;
}
@@ -2569,7 +2569,7 @@ ulp_mapper_tbls_process(struct bnxt_ulp_mapper_parms *parms, uint32_t tid)
return rc;
error:
BNXT_TF_DBG(ERR, "%s tables failed creation for %d:%d\n",
- (parms->tmpl_type = BNXT_ULP_TEMPLATE_TYPE_CLASS) ?
+ (parms->tmpl_type == BNXT_ULP_TEMPLATE_TYPE_CLASS) ?
"class" : "action", parms->dev_id, tid);
return rc;
}
--
2.21.1 (Apple Git-122.3)
next reply other threads:[~2020-11-12 15:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-12 15:29 Ajit Khaparde [this message]
2020-11-12 18:20 ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
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=20201112152945.99066-1-ajit.khaparde@broadcom.com \
--to=ajit.khaparde@broadcom.com \
--cc=dev@dpdk.org \
--cc=michael.baucom@broadcom.com \
--cc=stable@dpdk.org \
/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).