From: Lijun Ou <oulijun@huawei.com>
To: <ferruh.yigit@intel.com>
Cc: <dev@dpdk.org>, <linuxarm@huawei.com>
Subject: [dpdk-dev] [PATCH v2 5/8] net/hns3: fix uncheck return value warning
Date: Thu, 29 Oct 2020 20:49:08 +0800 [thread overview]
Message-ID: <1603975751-27955-6-git-send-email-oulijun@huawei.com> (raw)
In-Reply-To: <1603975751-27955-1-git-send-email-oulijun@huawei.com>
From: Hongbo Zheng <zhenghongbo3@huawei.com>
There are coverity defects related "calling
hns3_reset_all_tqps without checking return value
in hns3_do_start".
This patch fixes the warning by add "void" declaration
because here is exception handling, hns3_reset_all_tqps
will have the corresponding error message if it is
handled incorrectly, so it is not necessary to check
hns3_reset_all_tqps return value, here keep ret as the
error code causing the exception.
Coverity issue: 363048
Fixes: fa29fe45a7b4 ("net/hns3: support queue start and stop")
Cc: stable@dpdk.org
Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
---
drivers/net/hns3/hns3_ethdev.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 6342c70..6b4be76 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -4752,7 +4752,13 @@ hns3_do_start(struct hns3_adapter *hns, bool reset_queue)
err_config_mac_mode:
hns3_dev_release_mbufs(hns);
- hns3_reset_all_tqps(hns);
+ /*
+ * Here is exception handling, hns3_reset_all_tqps will have the
+ * corresponding error message if it is handled incorrectly, so it is
+ * not necessary to check hns3_reset_all_tqps return value, here keep
+ * ret as the error code causing the exception.
+ */
+ (void)hns3_reset_all_tqps(hns);
return ret;
}
--
2.7.4
next prev parent reply other threads:[~2020-10-29 12:48 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-29 11:14 [dpdk-dev] [PATCH 0/8] hns3 misc updates Lijun Ou
2020-10-29 11:14 ` [dpdk-dev] [PATCH 1/8] net/hns3: add queue count of Rx API support Lijun Ou
2020-10-29 11:14 ` [dpdk-dev] [PATCH 2/8] net/hns3: fix RSS max queue id allowed in multi-TC case Lijun Ou
2020-10-29 11:14 ` [dpdk-dev] [PATCH 3/8] net/hns3: fix packect type report in Rx Lijun Ou
2020-10-29 11:14 ` [dpdk-dev] [PATCH 4/8] net/hns3: fix uncheck return value warning Lijun Ou
2020-10-29 11:14 ` [dpdk-dev] [PATCH 5/8] net/hns3: fix data type to release fake queue > 255 Lijun Ou
2020-10-29 11:14 ` [dpdk-dev] [PATCH 6/8] net/hns3: fix HW ring not clear after queue stop Lijun Ou
2020-10-29 11:14 ` [dpdk-dev] [PATCH 7/8] net/hns3: fix return value check of setting VF bus master Lijun Ou
2020-10-29 11:14 ` [dpdk-dev] [PATCH 8/8] net/hns3: fix meson build for enabling SVE Rx/Tx Lijun Ou
2020-10-29 12:17 ` [dpdk-dev] [PATCH v2 0/8] hns3 misc updates Lijun Ou
2020-10-29 12:17 ` [dpdk-dev] [PATCH v2 1/8] net/hns3: enable RSS for ipv6-sctp dst/src port fields Lijun Ou
2020-10-29 12:17 ` [dpdk-dev] [PATCH v2 2/8] net/hns3: add queue count of Rx API support Lijun Ou
2020-10-29 12:17 ` [dpdk-dev] [PATCH v2 3/8] net/hns3: fix RSS max queue id allowed in multi-TC case Lijun Ou
2020-10-29 12:17 ` [dpdk-dev] [PATCH v2 4/8] net/hns3: fix packect type report in Rx Lijun Ou
2020-10-29 12:17 ` [dpdk-dev] [PATCH v2 5/8] net/hns3: fix uncheck return value warning Lijun Ou
2020-10-29 12:17 ` [dpdk-dev] [PATCH v2 6/8] net/hns3: fix data type to release fake queue > 255 Lijun Ou
2020-10-29 12:17 ` [dpdk-dev] [PATCH v2 7/8] net/hns3: fix HW ring not clear after queue stop Lijun Ou
2020-10-29 12:17 ` [dpdk-dev] [PATCH v2 8/8] net/hns3: fix return value check of setting VF bus Lijun Ou
2020-10-29 12:49 ` [dpdk-dev] [PATCH v2 0/8] hns3 misc updates Lijun Ou
2020-10-29 12:49 ` [dpdk-dev] [PATCH v2 1/8] net/hns3: enable RSS for ipv6-sctp dst/src port fields Lijun Ou
2020-10-29 12:49 ` [dpdk-dev] [PATCH v2 2/8] net/hns3: add queue count of Rx API support Lijun Ou
2020-10-29 12:49 ` [dpdk-dev] [PATCH v2 3/8] net/hns3: fix RSS max queue id allowed in multi-TC case Lijun Ou
2020-10-29 12:49 ` [dpdk-dev] [PATCH v2 4/8] net/hns3: fix packect type report in Rx Lijun Ou
2020-10-29 12:49 ` Lijun Ou [this message]
2020-10-29 12:49 ` [dpdk-dev] [PATCH v2 6/8] net/hns3: fix data type to release fake queue > 255 Lijun Ou
2020-10-29 12:49 ` [dpdk-dev] [PATCH v2 7/8] net/hns3: fix HW ring not clear after queue stop Lijun Ou
2020-10-29 12:49 ` [dpdk-dev] [PATCH v2 8/8] net/hns3: fix return value check of setting VF bus Lijun Ou
2020-10-29 12:51 ` [dpdk-dev] [PATCH v3 0/8] hns3 misc updates Lijun Ou
2020-10-29 12:51 ` [dpdk-dev] [PATCH v3 1/8] net/hns3: add queue count of Rx API support Lijun Ou
2020-10-29 12:51 ` [dpdk-dev] [PATCH v3 2/8] net/hns3: fix RSS max queue id allowed in multi-TC case Lijun Ou
2020-10-29 12:51 ` [dpdk-dev] [PATCH v3 3/8] net/hns3: fix packect type report in Rx Lijun Ou
2020-10-29 12:51 ` [dpdk-dev] [PATCH v3 4/8] net/hns3: fix uncheck return value warning Lijun Ou
2020-10-29 12:51 ` [dpdk-dev] [PATCH v3 5/8] net/hns3: fix data type to release fake queue > 255 Lijun Ou
2020-10-29 12:51 ` [dpdk-dev] [PATCH v3 6/8] net/hns3: fix HW ring not clear after queue stop Lijun Ou
2020-10-29 12:51 ` [dpdk-dev] [PATCH v3 7/8] net/hns3: fix value check of setting VF PCI bus function Lijun Ou
2020-10-29 12:51 ` [dpdk-dev] [PATCH v3 8/8] net/hns3: fix meson build for enabling SVE Rx/Tx Lijun Ou
2020-10-30 17:00 ` [dpdk-dev] [PATCH v3 0/8] hns3 misc updates 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=1603975751-27955-6-git-send-email-oulijun@huawei.com \
--to=oulijun@huawei.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=linuxarm@huawei.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).