From patchwork Thu Oct 29 12:17:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lijun Ou X-Patchwork-Id: 82744 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id DAD21A04B5; Thu, 29 Oct 2020 13:18:27 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 435C2CAD2; Thu, 29 Oct 2020 13:17:42 +0100 (CET) Received: from szxga07-in.huawei.com (szxga07-in.huawei.com [45.249.212.35]) by dpdk.org (Postfix) with ESMTP id D3166CAC0 for ; Thu, 29 Oct 2020 13:17:34 +0100 (CET) Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga07-in.huawei.com (SkyGuard) with ESMTP id 4CMPb26Pgpz6wsr for ; Thu, 29 Oct 2020 20:17:34 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.487.0; Thu, 29 Oct 2020 20:17:22 +0800 From: Lijun Ou To: CC: , Date: Thu, 29 Oct 2020 20:17:52 +0800 Message-ID: <1603973875-8431-6-git-send-email-oulijun@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1603973875-8431-1-git-send-email-oulijun@huawei.com> References: <1603970094-37384-1-git-send-email-oulijun@huawei.com> <1603973875-8431-1-git-send-email-oulijun@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Subject: [dpdk-dev] [PATCH v2 5/8] net/hns3: fix uncheck return value warning X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Hongbo Zheng 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 Signed-off-by: Lijun Ou --- 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; }